diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 19:31:57 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 19:31:57 +0000 |
commit | b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1 (patch) | |
tree | 40c6afa656bd48496d696790e9d47a4a7df4b315 /chrome/test | |
parent | 0a424afc9c94380ecd80967be73cfb684b6ae3f4 (diff) | |
download | chromium_src-b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1.zip chromium_src-b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1.tar.gz chromium_src-b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/base/testing_browser_process.cc | 5 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index 4866ad3..ef97f73 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc @@ -30,11 +30,10 @@ TestingBrowserProcess::~TestingBrowserProcess() { EXPECT_FALSE(local_state_); } -void TestingBrowserProcess::EndSession() { +void TestingBrowserProcess::ResourceDispatcherHostCreated() { } -ResourceDispatcherHost* TestingBrowserProcess::resource_dispatcher_host() { - return NULL; +void TestingBrowserProcess::EndSession() { } MetricsService* TestingBrowserProcess::metrics_service() { diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index 4f0fc10..db62178 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -47,8 +47,8 @@ class TestingBrowserProcess : public BrowserProcess { TestingBrowserProcess(); virtual ~TestingBrowserProcess(); + virtual void ResourceDispatcherHostCreated() OVERRIDE; virtual void EndSession() OVERRIDE; - virtual ResourceDispatcherHost* resource_dispatcher_host() OVERRIDE; virtual MetricsService* metrics_service() OVERRIDE; virtual IOThread* io_thread() OVERRIDE; virtual WatchDogThread* watchdog_thread() OVERRIDE; |