From 8b964d4bb1bd31734aaf057c2a1f72d8a13ae882 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Tue, 27 Jul 2010 16:51:15 -0700 Subject: [PATCH] Backed out changeset ca5a1f26565f --- docshell/base/IHistory.h | 4 +-- dom/ipc/ContentChild.cpp | 14 --------- dom/ipc/ContentChild.h | 2 -- dom/ipc/ContentParent.cpp | 11 ------- dom/ipc/ContentParent.h | 2 -- dom/ipc/Makefile.in | 1 - dom/ipc/PContent.ipdl | 4 --- toolkit/components/places/src/History.cpp | 38 ++--------------------- toolkit/components/places/src/Makefile.in | 5 --- 9 files changed, 4 insertions(+), 77 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/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 8540f221ad88..238e4f0eb4b8 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -54,10 +54,6 @@ #include "nsXULAppAPI.h" #include "nsWeakReference.h" -#include "History.h" -#include "nsDocShellCID.h" -#include "nsNetUtil.h" - #include "base/message_loop.h" #include "base/task.h" @@ -66,7 +62,6 @@ using namespace mozilla::ipc; using namespace mozilla::net; -using namespace mozilla::places; namespace mozilla { namespace dom { @@ -348,14 +343,5 @@ ContentChild::RecvNotifyRemotePrefObserver(const nsCString& aPref) return true; } -bool -ContentChild::RecvNotifyVisited(const IPC::URI& aURI) -{ - nsCOMPtr newURI = aURI; - nsRefPtr history = History::GetSingleton(); - history->NotifyVisited(newURI); - return true; -} - } // namespace dom } // namespace mozilla diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index 73dca7430032..505f9f8e58ec 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -88,8 +88,6 @@ public: virtual bool RecvSetOffline(const PRBool& offline); - virtual bool RecvNotifyVisited(const IPC::URI& aURI); - /** * Notify |aObserver| of changes to |aPrefRoot|.|aDomain|. If * |aHoldWeak|, only a weak reference to |aObserver| is held. diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 73f748a24560..72ef2a346874 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -40,7 +40,6 @@ #include "ContentParent.h" #include "TabParent.h" -#include "History.h" #include "mozilla/ipc/TestShellParent.h" #include "mozilla/net/NeckoParent.h" #include "nsIPrefBranch.h" @@ -56,7 +55,6 @@ using namespace mozilla::ipc; using namespace mozilla::net; -using namespace mozilla::places; using mozilla::MonitorAutoEnter; namespace mozilla { @@ -432,15 +430,6 @@ ContentParent::RequestRunToCompletion() return !!mRunToCompletionDepth; } -bool -ContentParent::RecvStartVisitedQuery(const IPC::URI& aURI) -{ - nsCOMPtr newURI = aURI; - IHistory *history = nsContentUtils::GetHistory(); - history->RegisterVisitedCallback(newURI, nsnull); - return true; -} - /* void onDispatchedEvent (in nsIThreadInternal thread); */ NS_IMETHODIMP ContentParent::OnDispatchedEvent(nsIThreadInternal *thread) diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 10a8fa5eb5d2..cd46534817aa 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -145,8 +145,6 @@ private: void EnsurePrefService(); void EnsurePermissionService(); - virtual bool RecvStartVisitedQuery(const IPC::URI& uri); - mozilla::Monitor mMonitor; GeckoChildProcessHost* mSubprocess; diff --git a/dom/ipc/Makefile.in b/dom/ipc/Makefile.in index 3dc4680c4f0f..5f77b9dc3576 100644 --- a/dom/ipc/Makefile.in +++ b/dom/ipc/Makefile.in @@ -79,7 +79,6 @@ include $(topsrcdir)/config/rules.mk LOCAL_INCLUDES += \ -I$(srcdir)/../../content/base/src \ -I$(srcdir)/../../content/events/src \ - -I$(srcdir)/../../toolkit/components/places/src \ -I$(srcdir)/../src/geolocation \ -I$(topsrcdir)/chrome/src \ $(NULL) diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 661684268573..fd205f40cfba 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -68,8 +68,6 @@ child: async SetOffline(PRBool offline); - async NotifyVisited(URI uri); - NotifyRemotePrefObserver(nsCString aDomain); parent: @@ -77,8 +75,6 @@ parent: // Services remoting - async StartVisitedQuery(URI uri); - // PrefService 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 926f976717f3..7e18c3d2795c 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/ContentChild.h" -#include "mozilla/dom/ContentParent.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::ContentChild * cpc = - mozilla::dom::ContentChild::GetSingleton(); - NS_ASSERTION(cpc, "Content Protocol is NULL!"); - (void)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); @@ -974,15 +956,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::ContentParent* cpp = - mozilla::dom::ContentParent::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()) { @@ -1162,14 +1135,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()) { @@ -1192,7 +1158,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; diff --git a/toolkit/components/places/src/Makefile.in b/toolkit/components/places/src/Makefile.in index a136080b007d..2c993b31ce7f 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 \