diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 21:43:17 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 21:43:17 +0000 |
commit | b39e7a88bd6d2cbe16754ebca13af1a0ca837fb1 (patch) | |
tree | bbb01564db7c3a79032fdb8dec716c7496c9c9e2 /chrome_frame | |
parent | 52da2379abbfa18dbc333bb275b7377ad8dce551 (diff) | |
download | chromium_src-b39e7a88bd6d2cbe16754ebca13af1a0ca837fb1.zip chromium_src-b39e7a88bd6d2cbe16754ebca13af1a0ca837fb1.tar.gz chromium_src-b39e7a88bd6d2cbe16754ebca13af1a0ca837fb1.tar.bz2 |
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
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 19 | ||||
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.h | 5 |
2 files changed, 24 insertions, 0 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index 20b3e04..d4d00a1 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -605,7 +605,16 @@ void CFUrlRequestUnittestRunner::PreCreateThreads() { StartChromeFrameInHostBrowser(); } +void CFUrlRequestUnittestRunner::PreStartThread(BrowserThread::ID identifier) { + fake_chrome_->browser_process()->PreStartThread(identifier); +} + +void CFUrlRequestUnittestRunner::PostStartThread(BrowserThread::ID identifier) { + fake_chrome_->browser_process()->PostStartThread(identifier); +} + void CFUrlRequestUnittestRunner::PreMainMessageLoopRun() { + fake_chrome_->InitializePostThreadsCreated(); } bool CFUrlRequestUnittestRunner::MainMessageLoopRun(int* result_code) { @@ -632,6 +641,16 @@ void CFUrlRequestUnittestRunner::PostMainMessageLoopRun() { base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); } +void CFUrlRequestUnittestRunner::PreStopThread( + content::BrowserThread::ID identifier) { + fake_chrome_->browser_process()->PreStopThread(identifier); +} + +void CFUrlRequestUnittestRunner::PostStopThread( + content::BrowserThread::ID identifier) { + fake_chrome_->browser_process()->PostStopThread(identifier); +} + void CFUrlRequestUnittestRunner::PostDestroyThreads() { fake_chrome_->Shutdown(); fake_chrome_.reset(); diff --git a/chrome_frame/test/net/fake_external_tab.h b/chrome_frame/test/net/fake_external_tab.h index 8a1a190..b0089a8 100644 --- a/chrome_frame/test/net/fake_external_tab.h +++ b/chrome_frame/test/net/fake_external_tab.h @@ -105,9 +105,14 @@ class CFUrlRequestUnittestRunner virtual void PostMainMessageLoopStart() OVERRIDE {} virtual void ToolkitInitialized() OVERRIDE {} virtual void PreCreateThreads() OVERRIDE; + virtual void PreStartThread(content::BrowserThread::ID identifier) OVERRIDE; + virtual void PostStartThread( + content::BrowserThread::ID identifier) OVERRIDE; virtual void PreMainMessageLoopRun() OVERRIDE; virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; virtual void PostMainMessageLoopRun() OVERRIDE; + virtual void PreStopThread(content::BrowserThread::ID identifier) OVERRIDE; + virtual void PostStopThread(content::BrowserThread::ID identifier) OVERRIDE; virtual void PostDestroyThreads() OVERRIDE; protected: |