diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 18:20:48 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 18:20:48 +0000 |
commit | e000ac9d1db03a60712a489d6e557780c600a6c3 (patch) | |
tree | 4f1c3f69810829d1b2c33a67c70b0292c00feb03 /content | |
parent | 00d60fa690f04d37f7cc34688b8511cd3397fc3b (diff) | |
download | chromium_src-e000ac9d1db03a60712a489d6e557780c600a6c3.zip chromium_src-e000ac9d1db03a60712a489d6e557780c600a6c3.tar.gz chromium_src-e000ac9d1db03a60712a489d6e557780c600a6c3.tar.bz2 |
We don't need to do both OleInitialize() and CoInitializeEx() on the same thread. Eliminate the ScopedCOMInitializer that does the latter for the main thread, and move the ScopedOleInitializer that does the former into the same spot.
BUG=none
TEST=Running Win debug Chrome does not produce console output about duplicate COM initializations
Review URL: https://codereview.chromium.org/11000010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/browser_main_loop.h | 8 | ||||
-rw-r--r-- | content/browser/browser_main_runner.cc | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h index 6f5abe5..b6f14ce 100644 --- a/content/browser/browser_main_loop.h +++ b/content/browser/browser_main_loop.h @@ -9,10 +9,6 @@ #include "base/memory/scoped_ptr.h" #include "content/browser/browser_process_sub_thread.h" -#if defined(OS_WIN) -#include "ui/base/win/scoped_ole_initializer.h" -#endif - class BrowserOnlineStateObserver; class CommandLine; class HighResolutionTimerManager; @@ -140,10 +136,6 @@ class BrowserMainLoop { scoped_ptr<BrowserProcessSubThread> cache_thread_; scoped_ptr<BrowserProcessSubThread> io_thread_; -#if defined(OS_WIN) - ui::ScopedOleInitializer ole_initializer_; -#endif - DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); }; diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc index 4333b75..242508c 100644 --- a/content/browser/browser_main_runner.cc +++ b/content/browser/browser_main_runner.cc @@ -20,7 +20,7 @@ #if defined(OS_WIN) #include "base/win/metro.h" -#include "base/win/scoped_com_initializer.h" +#include "ui/base/win/scoped_ole_initializer.h" #include "ui/base/win/tsf_bridge.h" #endif @@ -94,7 +94,7 @@ class BrowserMainRunnerImpl : public content::BrowserMainRunner { // Make this call before going multithreaded, or spawning any subprocesses. base::allocator::SetupSubprocessAllocator(); #endif - com_initializer_.reset(new base::win::ScopedCOMInitializer); + ole_initializer_.reset(new ui::ScopedOleInitializer); if (base::win::IsTsfAwareRequired()) ui::TsfBridge::Initialize(); #endif // OS_WIN @@ -134,7 +134,7 @@ class BrowserMainRunnerImpl : public content::BrowserMainRunner { #if defined(OS_WIN) if (base::win::IsTsfAwareRequired()) ui::TsfBridge::GetInstance()->Shutdown(); - com_initializer_.reset(NULL); + ole_initializer_.reset(NULL); #endif main_loop_.reset(NULL); @@ -157,7 +157,7 @@ class BrowserMainRunnerImpl : public content::BrowserMainRunner { scoped_ptr<NotificationServiceImpl> notification_service_; scoped_ptr<content::BrowserMainLoop> main_loop_; #if defined(OS_WIN) - scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; + scoped_ptr<ui::ScopedOleInitializer> ole_initializer_; #endif DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); |