diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 05:41:40 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 05:41:40 +0000 |
commit | 99907365ccdfb821ab0c34e36dadcb26ce25f20e (patch) | |
tree | 8676bbe1bfebcf35c0f71d31b06b2c9f1e2afb6f /chrome_frame | |
parent | 57b8bb357db85d85157c3a87f0b87383343867d8 (diff) | |
download | chromium_src-99907365ccdfb821ab0c34e36dadcb26ce25f20e.zip chromium_src-99907365ccdfb821ab0c34e36dadcb26ce25f20e.tar.gz chromium_src-99907365ccdfb821ab0c34e36dadcb26ce25f20e.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
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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117078
Review URL: http://codereview.chromium.org/9150016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 20 | ||||
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.h | 5 |
2 files changed, 2 insertions, 23 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index d4d00a1..c3e45b2 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -599,20 +599,13 @@ void CFUrlRequestUnittestRunner::PreEarlyInitialization() { void CFUrlRequestUnittestRunner::PreCreateThreads() { fake_chrome_.reset(new FakeExternalTab()); fake_chrome_->Initialize(); + fake_chrome_->browser_process()->PreCreateThreads(); pss_subclass_.reset(new ProcessSingletonSubclass(this)); EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_->user_data())); 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(); } @@ -641,17 +634,8 @@ 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_->browser_process()->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 b0089a8..8a1a190 100644 --- a/chrome_frame/test/net/fake_external_tab.h +++ b/chrome_frame/test/net/fake_external_tab.h @@ -105,14 +105,9 @@ 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: |