Places on m-c was backed out, so this backs out the e10s bits: 5690bf8b558b, 87122ab4c9b2, ca18a037097f, 71114e4522c7

This commit is contained in:
Doug Turner 2010-06-29 20:09:43 -07:00
parent 934365f4db
commit 341dfa16b5
9 changed files with 5 additions and 133 deletions

View File

@ -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.

View File

@ -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<nsIURI> newURI = aURI;
History::GetSingleton()->NotifyVisited(newURI);
return true;
}
} // namespace dom
} // namespace mozilla

View File

@ -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);

View File

@ -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<nsIURI> 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<nsIURI> ourURI = uri;
nsCOMPtr<nsIURI> ourReferrer = referrer;
IHistory *history = nsContentUtils::GetHistory();
history->VisitURI(ourURI, ourReferrer, flags);
return true;
}
bool
ContentProcessParent::RecvSetURITitle(const IPC::URI& uri,
const nsString& title)
{
nsCOMPtr<nsIURI> ourURI = uri;
IHistory *history = nsContentUtils::GetHistory();
history->SetURITitle(ourURI, title);
return true;
}
/* void onDispatchedEvent (in nsIThreadInternal thread); */
NS_IMETHODIMP
ContentProcessParent::OnDispatchedEvent(nsIThreadInternal *thread)

View File

@ -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;

View File

@ -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 \

View File

@ -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);

View File

@ -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;

View File

@ -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