зеркало из https://github.com/mozilla/gecko-dev.git
Bug 799609 - Disable Places in B2G - Part 1 - Remove Android history from Places
r=paolo
This commit is contained in:
Родитель
042bd8ad7a
Коммит
63752889cd
|
@ -363,12 +363,6 @@ Database::~Database()
|
|||
nsresult
|
||||
Database::Init()
|
||||
{
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
// Currently places has deeply weaved it way throughout the gecko codebase.
|
||||
// Here we disable all database creation and loading of places.
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsCOMPtr<mozIStorageService> storage =
|
||||
|
|
|
@ -1454,10 +1454,10 @@ History::~History()
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
NS_IMETHODIMP
|
||||
History::NotifyVisited(nsIURI* aURI)
|
||||
{
|
||||
NS_ASSERTION(aURI, "Ruh-roh! A NULL URI was passed to us!");
|
||||
NS_ENSURE_ARG(aURI);
|
||||
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
|
||||
|
@ -1477,14 +1477,14 @@ History::NotifyVisited(nsIURI* aURI)
|
|||
// If the hash table has not been initialized, then we have nothing to notify
|
||||
// about.
|
||||
if (!mObservers.IsInitialized()) {
|
||||
return;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Additionally, if we have no observers for this URI, we have nothing to
|
||||
// notify about.
|
||||
KeyClass* key = mObservers.GetEntry(aURI);
|
||||
if (!key) {
|
||||
return;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Update status of each Link node.
|
||||
|
@ -1503,6 +1503,7 @@ History::NotifyVisited(nsIURI* aURI)
|
|||
|
||||
// All the registered nodes can now be removed for this URI.
|
||||
mObservers.RemoveEntry(aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mozIStorageAsyncStatement*
|
||||
|
|
|
@ -47,14 +47,6 @@ public:
|
|||
|
||||
History();
|
||||
|
||||
/**
|
||||
* Notifies about the visited status of a given URI.
|
||||
*
|
||||
* @param aURI
|
||||
* The URI to notify about.
|
||||
*/
|
||||
void NotifyVisited(nsIURI* aURI);
|
||||
|
||||
/**
|
||||
* Obtains the statement to use to check if a URI is visited or not.
|
||||
*/
|
||||
|
|
|
@ -69,15 +69,6 @@ CPPSRCS = \
|
|||
|
||||
LOCAL_INCLUDES += -I$(srcdir)/../build
|
||||
|
||||
ifdef MOZ_ANDROID_HISTORY
|
||||
CPPSRCS += nsAndroidHistory.cpp
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(topsrcdir)/docshell/base \
|
||||
-I$(topsrcdir)/content/base/src \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifndef MOZ_ANDROID_HISTORY
|
||||
EXTRA_COMPONENTS = \
|
||||
toolkitplaces.manifest \
|
||||
nsLivemarkService.js \
|
||||
|
@ -104,7 +95,6 @@ EXTRA_PP_JS_MODULES = \
|
|||
$(NULL)
|
||||
|
||||
TEST_DIRS += tests
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
|
|
@ -14,10 +14,6 @@
|
|||
#include "History.h"
|
||||
#include "nsDocShellCID.h"
|
||||
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
#include "nsAndroidHistory.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla::places;
|
||||
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsNavHistory,
|
||||
|
@ -30,11 +26,7 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsFaviconService,
|
|||
nsFaviconService::GetSingleton)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPlacesExportService,
|
||||
nsPlacesExportService::GetSingleton)
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsAndroidHistory, nsAndroidHistory::GetSingleton)
|
||||
#else
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(History, History::GetSingleton)
|
||||
#endif
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAnnoProtocolHandler)
|
||||
NS_DEFINE_NAMED_CID(NS_NAVHISTORYSERVICE_CID);
|
||||
|
@ -43,12 +35,7 @@ NS_DEFINE_NAMED_CID(NS_ANNOPROTOCOLHANDLER_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_NAVBOOKMARKSSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FAVICONSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_PLACESIMPORTEXPORTSERVICE_CID);
|
||||
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
NS_DEFINE_NAMED_CID(NS_ANDROIDHISTORY_CID);
|
||||
#else
|
||||
NS_DEFINE_NAMED_CID(NS_HISTORYSERVICE_CID);
|
||||
#endif
|
||||
|
||||
const mozilla::Module::CIDEntry kPlacesCIDs[] = {
|
||||
{ &kNS_NAVHISTORYSERVICE_CID, false, NULL, nsNavHistoryConstructor },
|
||||
|
@ -56,11 +43,7 @@ const mozilla::Module::CIDEntry kPlacesCIDs[] = {
|
|||
{ &kNS_ANNOPROTOCOLHANDLER_CID, false, NULL, nsAnnoProtocolHandlerConstructor },
|
||||
{ &kNS_NAVBOOKMARKSSERVICE_CID, false, NULL, nsNavBookmarksConstructor },
|
||||
{ &kNS_FAVICONSERVICE_CID, false, NULL, nsFaviconServiceConstructor },
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
{ &kNS_ANDROIDHISTORY_CID, false, NULL, nsAndroidHistoryConstructor },
|
||||
#else
|
||||
{ &kNS_HISTORYSERVICE_CID, false, NULL, HistoryConstructor },
|
||||
#endif
|
||||
{ &kNS_PLACESIMPORTEXPORTSERVICE_CID, false, NULL, nsPlacesExportServiceConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
@ -73,12 +56,8 @@ const mozilla::Module::ContractIDEntry kPlacesContracts[] = {
|
|||
{ NS_NAVBOOKMARKSSERVICE_CONTRACTID, &kNS_NAVBOOKMARKSSERVICE_CID },
|
||||
{ NS_FAVICONSERVICE_CONTRACTID, &kNS_FAVICONSERVICE_CID },
|
||||
{ "@mozilla.org/embeddor.implemented/bookmark-charset-resolver;1", &kNS_NAVHISTORYSERVICE_CID },
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
{ NS_IHISTORY_CONTRACTID, &kNS_ANDROIDHISTORY_CID },
|
||||
#else
|
||||
{ NS_IHISTORY_CONTRACTID, &kNS_HISTORYSERVICE_CID },
|
||||
{ NS_DOWNLOADHISTORY_CONTRACTID, &kNS_HISTORYSERVICE_CID },
|
||||
#endif
|
||||
{ NS_PLACESIMPORTEXPORTSERVICE_CONTRACTID, &kNS_PLACESIMPORTEXPORTSERVICE_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче