From b39e7a88bd6d2cbe16754ebca13af1a0ca837fb1 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Tue, 10 Jan 2012 21:43:17 +0000 Subject: Revert 117078 - Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a few benefits: -avoid having each embedder know when to create/destruct these objects, as well as contained objects (i.e. those related to downloads) -avoid having to tell embedders about specifics of BrowserThread startup/shutdown -move ResourceDispatcherHost's getter to content where it belongs Some code (extensions+promos) used the fact that RDH is NULL in unittests as a signal to not use the utility process. I've switches those unittests to set a flag on the objects instead. I've taken out the DnsParallelism field trial (not used anymore, confirmed with jar) as it was the only thing that caused MetricsService to depend on IOThread initialization, which also depended on MetricsService (through FieldTrials). This two-sided dependency always annoyed me and made the code hard to restructure. BUG=98716 Review URL: http://codereview.chromium.org/9150016 TBR=jam@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117096 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_process.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'chrome/browser/browser_process.h') diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h index 27ec3064..c683820 100644 --- a/chrome/browser/browser_process.h +++ b/chrome/browser/browser_process.h @@ -83,9 +83,6 @@ class BrowserProcess { BrowserProcess(); virtual ~BrowserProcess(); - // Called when the ResourceDispatcherHost object is created by content. - virtual void ResourceDispatcherHostCreated() = 0; - // Invoked when the user is logging out/shutting down. When logging off we may // not have enough time to do a normal shutdown. This method is invoked prior // to normal shutdown and saves any state that must be saved before we are @@ -93,6 +90,8 @@ class BrowserProcess { virtual void EndSession() = 0; // Services: any of these getters may return NULL + virtual ResourceDispatcherHost* resource_dispatcher_host() = 0; + virtual MetricsService* metrics_service() = 0; virtual ProfileManager* profile_manager() = 0; virtual PrefService* local_state() = 0; -- cgit v1.1