From b30e9a9fec545f8e6f60824614780f96280d08a9 Mon Sep 17 00:00:00 2001 From: Doug Turner Date: Tue, 29 Jun 2010 20:09:43 -0700 Subject: [PATCH] Places on m-c was backed out, so this backs out the e10s bits: 5690bf8b558b, 87122ab4c9b2, ca18a037097f, 71114e4522c7 --- docshell/base/IHistory.h | 4 +- dom/ipc/ContentProcessChild.cpp | 12 ----- dom/ipc/ContentProcessChild.h | 2 - dom/ipc/ContentProcessParent.cpp | 37 +-------------- dom/ipc/ContentProcessParent.h | 10 ---- dom/ipc/Makefile.in | 1 - dom/ipc/PContentProcess.ipdl | 8 ---- toolkit/components/places/src/History.cpp | 57 +---------------------- toolkit/components/places/src/Makefile.in | 7 --- 9 files changed, 5 insertions(+), 133 deletions(-) diff --git a/docshell/base/IHistory.h b/docshell/base/IHistory.h index b03c718508af..04777ed94975 100644 --- a/docshell/base/IHistory.h +++ b/docshell/base/IHistory.h @@ -52,7 +52,7 @@ namespace mozilla { } #define IHISTORY_IID \ - {0x6f733924, 0x6321, 0x4384, {0x01, 0xee, 0x8e, 0x7d, 0xfb, 0xde, 0xe7, 0xa8}} + {0x6f736049, 0x6370, 0x4376, {0xb7, 0x17, 0xfa, 0xfc, 0x0b, 0x4f, 0xd0, 0xf1}} class IHistory : public nsISupports { @@ -71,7 +71,7 @@ public: * UnregisterVisitedCallback. * * @pre aURI must not be null. - * @pre aLink may be null only in the MOZ_IPC parent process. + * @pre aLink must not be null. * * @param aURI * The URI to check. diff --git a/dom/ipc/ContentProcessChild.cpp b/dom/ipc/ContentProcessChild.cpp index 513f865b24b3..ed9f2c56e414 100644 --- a/dom/ipc/ContentProcessChild.cpp +++ b/dom/ipc/ContentProcessChild.cpp @@ -45,11 +45,8 @@ #include "mozilla/ipc/XPCShellEnvironment.h" #include "mozilla/jsipc/PContextWrapperChild.h" -#include "History.h" #include "nsXULAppAPI.h" -#include "nsDocShellCID.h" -#include "nsNetUtil.h" #include "base/message_loop.h" #include "base/task.h" @@ -58,7 +55,6 @@ using namespace mozilla::ipc; using namespace mozilla::net; -using namespace mozilla::places; namespace mozilla { namespace dom { @@ -223,13 +219,5 @@ ContentProcessChild::RecvNotifyRemotePrefObserver(const nsCString& aDomain) return true; } -bool -ContentProcessChild::RecvNotifyVisited(const IPC::URI& aURI) -{ - nsCOMPtr newURI = aURI; - History::GetSingleton()->NotifyVisited(newURI); - return true; -} - } // namespace dom } // namespace mozilla diff --git a/dom/ipc/ContentProcessChild.h b/dom/ipc/ContentProcessChild.h index d47be3ebfbb7..3d6c590fe9ce 100644 --- a/dom/ipc/ContentProcessChild.h +++ b/dom/ipc/ContentProcessChild.h @@ -149,8 +149,6 @@ public: virtual bool RecvSetOffline(const PRBool& offline); - virtual bool RecvNotifyVisited(const IPC::URI& aURI); - nsresult AddRemotePrefObserver(const nsCString &aDomain, const nsCString &aPrefRoot, nsIObserver *aObserver, PRBool aHoldWeak); diff --git a/dom/ipc/ContentProcessParent.cpp b/dom/ipc/ContentProcessParent.cpp index fd00782a43dd..9905b8aede4a 100644 --- a/dom/ipc/ContentProcessParent.cpp +++ b/dom/ipc/ContentProcessParent.cpp @@ -40,14 +40,13 @@ #include "ContentProcessParent.h" #include "TabParent.h" -#include "History.h" #include "mozilla/ipc/TestShellParent.h" #include "mozilla/net/NeckoParent.h" #include "nsIPrefBranch.h" #include "nsIPrefBranch2.h" #include "nsIPrefLocalizedString.h" #include "nsIObserverService.h" -#include "nsContentUtils.h" + #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsServiceManagerUtils.h" @@ -56,7 +55,6 @@ using namespace mozilla::ipc; using namespace mozilla::net; -using namespace mozilla::places; using mozilla::MonitorAutoEnter; namespace mozilla { @@ -399,39 +397,6 @@ ContentProcessParent::RequestRunToCompletion() return !!mRunToCompletionDepth; } - -bool -ContentProcessParent::RecvStartVisitedQuery(const IPC::URI& aURI) -{ - nsCOMPtr newURI = aURI; - IHistory *history = nsContentUtils::GetHistory(); - history->RegisterVisitedCallback(newURI, nsnull); - return true; -} - -bool -ContentProcessParent::RecvVisitURI(const IPC::URI& uri, - const IPC::URI& referrer, - const PRUint32& flags) -{ - nsCOMPtr ourURI = uri; - nsCOMPtr ourReferrer = referrer; - IHistory *history = nsContentUtils::GetHistory(); - history->VisitURI(ourURI, ourReferrer, flags); - return true; -} - - -bool -ContentProcessParent::RecvSetURITitle(const IPC::URI& uri, - const nsString& title) -{ - nsCOMPtr ourURI = uri; - IHistory *history = nsContentUtils::GetHistory(); - history->SetURITitle(ourURI, title); - return true; -} - /* void onDispatchedEvent (in nsIThreadInternal thread); */ NS_IMETHODIMP ContentProcessParent::OnDispatchedEvent(nsIThreadInternal *thread) diff --git a/dom/ipc/ContentProcessParent.h b/dom/ipc/ContentProcessParent.h index 760c336cff4e..fc37eca6217e 100644 --- a/dom/ipc/ContentProcessParent.h +++ b/dom/ipc/ContentProcessParent.h @@ -47,7 +47,6 @@ #include "nsIObserver.h" #include "nsIThreadInternal.h" #include "mozilla/Monitor.h" -#include "nsNetUtil.h" #include "nsIPrefService.h" namespace mozilla { @@ -139,15 +138,6 @@ private: void EnsurePrefService(); - virtual bool RecvVisitURI(const IPC::URI& uri, - const IPC::URI& referrer, - const PRUint32& flags); - - virtual bool RecvStartVisitedQuery(const IPC::URI& uri); - - virtual bool RecvSetURITitle(const IPC::URI& uri, - const nsString& title); - mozilla::Monitor mMonitor; GeckoChildProcessHost* mSubprocess; diff --git a/dom/ipc/Makefile.in b/dom/ipc/Makefile.in index 1cac27734b8e..ab9f80237d90 100644 --- a/dom/ipc/Makefile.in +++ b/dom/ipc/Makefile.in @@ -78,7 +78,6 @@ include $(topsrcdir)/config/rules.mk LOCAL_INCLUDES += \ -I$(srcdir)/../../content/base/src \ - -I$(srcdir)/../../toolkit/components/places/src \ -I$(srcdir)/../../content/events/src \ -I$(srcdir)/../src/geolocation \ -I$(topsrcdir)/chrome/src \ diff --git a/dom/ipc/PContentProcess.ipdl b/dom/ipc/PContentProcess.ipdl index d53324d9d21a..71cf13d4c7cc 100644 --- a/dom/ipc/PContentProcess.ipdl +++ b/dom/ipc/PContentProcess.ipdl @@ -42,9 +42,7 @@ include protocol PNecko; include "mozilla/TabTypes.h"; include "mozilla/chrome/RegistryMessageUtils.h"; -include "mozilla/net/NeckoMessageUtils.h"; -using IPC::URI; using ChromePackage; using ResourceMapping; using OverrideMapping; @@ -68,17 +66,11 @@ child: async SetOffline(PRBool offline); - async NotifyVisited(URI uri); - NotifyRemotePrefObserver(nsCString aDomain); parent: PNecko(); - async VisitURI(URI uri, URI referrer, PRUint32 flags); - async SetURITitle(URI uri, nsString title); - async StartVisitedQuery(URI uri); - // prefs-related messages ... sync GetPrefType(nsCString prefName) returns (PRInt32 retValue, nsresult rv); sync GetBoolPref(nsCString prefName) returns (PRBool retValue, nsresult rv); diff --git a/toolkit/components/places/src/History.cpp b/toolkit/components/places/src/History.cpp index a3564033314e..48fe26593042 100644 --- a/toolkit/components/places/src/History.cpp +++ b/toolkit/components/places/src/History.cpp @@ -37,12 +37,6 @@ * * ***** END LICENSE BLOCK ***** */ -#ifdef MOZ_IPC -#include "mozilla/dom/ContentProcessChild.h" -#include "mozilla/dom/ContentProcessParent.h" -#include "nsXULAppAPI.h" -#endif - #include "History.h" #include "nsNavHistory.h" #include "nsNavBookmarks.h" @@ -161,18 +155,6 @@ public: { NS_PRECONDITION(aURI, "Null URI"); -#ifdef MOZ_IPC - // If we are a content process, always remote the request to the - // parent process. - if (XRE_GetProcessType() == GeckoProcessType_Content) { - mozilla::dom::ContentProcessChild * cpc = - mozilla::dom::ContentProcessChild::GetSingleton(); - NS_ASSERTION(cpc, "Content Protocol is NULL!"); - cpc->SendStartVisitedQuery(IPC::URI(aURI)); - return NS_OK; - } -#endif - nsNavHistory* navHist = nsNavHistory::GetHistoryService(); NS_ENSURE_TRUE(navHist, NS_ERROR_FAILURE); mozIStorageStatement* stmt = navHist->GetStatementById(DB_IS_PAGE_VISITED); @@ -924,15 +906,6 @@ History::NotifyVisited(nsIURI* aURI) { NS_ASSERTION(aURI, "Ruh-roh! A NULL URI was passed to us!"); -#ifdef MOZ_IPC - if (XRE_GetProcessType() == GeckoProcessType_Default) { - mozilla::dom::ContentProcessParent* cpp = - mozilla::dom::ContentProcessParent::GetSingleton(); - NS_ASSERTION(cpp, "Content Protocol is NULL!"); - (void)cpp->SendNotifyVisited(IPC::URI(aURI)); - } -#endif - // If the hash table has not been initialized, then we have nothing to notify // about. if (!mObservers.IsInitialized()) { @@ -1011,16 +984,6 @@ History::VisitURI(nsIURI* aURI, { NS_PRECONDITION(aURI, "URI should not be NULL."); -#ifdef MOZ_IPC - if (XRE_GetProcessType() == GeckoProcessType_Content) { - mozilla::dom::ContentProcessChild * cpc = - mozilla::dom::ContentProcessChild::GetSingleton(); - NS_ASSERTION(cpc, "Content Protocol is NULL!"); - (void) cpc->SendVisitURI(IPC::URI(aURI), IPC::URI(aLastVisitedURI), aFlags); - return NS_OK; - } -#endif /* MOZ_IPC */ - nsNavHistory* history = nsNavHistory::GetHistoryService(); NS_ENSURE_TRUE(history, NS_ERROR_OUT_OF_MEMORY); @@ -1104,14 +1067,7 @@ History::RegisterVisitedCallback(nsIURI* aURI, Link* aLink) { NS_ASSERTION(aURI, "Must pass a non-null URI!"); -#ifdef MOZ_IPC - if (XRE_GetProcessType() == GeckoProcessType_Content) { - NS_PRECONDITION(aLink, "Must pass a non-null URI!"); - } -#else - NS_PRECONDITION(aLink, "Must pass a non-null URI!"); -#endif - + NS_ASSERTION(aLink, "Must pass a non-null Link object!"); // First, ensure that our hash table is setup. if (!mObservers.IsInitialized()) { @@ -1134,7 +1090,7 @@ History::RegisterVisitedCallback(nsIURI* aURI, // Links wanting to know about this URI. Therefore, we should query the // database now. nsresult rv = VisitedQuery::Start(aURI); - if (NS_FAILED(rv) || !aLink) { + if (NS_FAILED(rv)) { // Remove our array from the hashtable so we don't keep it around. mObservers.RemoveEntry(aURI); return rv; @@ -1187,15 +1143,6 @@ NS_IMETHODIMP History::SetURITitle(nsIURI* aURI, const nsAString& aTitle) { NS_PRECONDITION(aURI, "Must pass a non-null URI!"); -#ifdef MOZ_IPC - if (XRE_GetProcessType() == GeckoProcessType_Content) { - mozilla::dom::ContentProcessChild* cpc = - mozilla::dom::ContentProcessChild::GetSingleton(); - NS_ASSERTION(cpc, "Content Protocol is NULL!"); - (void)cpc->SendSetURITitle(IPC::URI(aURI), nsDependentString(aTitle)); - return NS_OK; - } -#endif /* MOZ_IPC */ nsNavHistory* history = nsNavHistory::GetHistoryService(); PRBool canAdd; diff --git a/toolkit/components/places/src/Makefile.in b/toolkit/components/places/src/Makefile.in index e35a9d7418ce..2db9801d2e3d 100644 --- a/toolkit/components/places/src/Makefile.in +++ b/toolkit/components/places/src/Makefile.in @@ -50,11 +50,6 @@ EXPORT_LIBRARY = 1 MODULE_NAME = nsPlacesModule IS_COMPONENT = 1 -EXPORTS_NAMESPACES = mozilla/places - -EXPORTS_mozilla/places = \ - History.h \ - $(NULL) CPPSRCS = \ nsAnnoProtocolHandler.cpp \ @@ -103,6 +98,4 @@ EXTRA_PP_JS_MODULES = \ PlacesUtils.jsm \ $(NULL) -include $(topsrcdir)/config/config.mk -include $(topsrcdir)/ipc/chromium/chromium-config.mk include $(topsrcdir)/config/rules.mk