Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: content/plugin/plugin_main.cc

Issue 11050009: Use ScopedCOMInitializer in more places. While this doesn't always simplify code, it does mean we … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/plugin/plugin_main.cc
===================================================================
--- content/plugin/plugin_main.cc (revision 159813)
+++ content/plugin/plugin_main.cc (working copy)
@@ -5,7 +5,6 @@
#include "build/build_config.h"
#if defined(OS_WIN)
-#include <objbase.h>
#include <windows.h>
#endif
@@ -22,6 +21,7 @@
#include "content/public/common/main_function_params.h"
#if defined(OS_WIN)
+#include "base/win/scoped_com_initializer.h"
#include "content/public/common/injection_test_win.h"
#include "sandbox/win/src/sandbox.h"
#elif defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -118,7 +118,8 @@
sandbox::TargetServices* target_services =
parameters.sandbox_info->target_services;
- CoInitialize(NULL);
+ base::win::ScopedCOMInitializer com_initializer;
+
DVLOG(1) << "Started plugin with "
<< parsed_command_line.GetCommandLineString();
@@ -183,7 +184,6 @@
#if defined(OS_WIN)
DestroyIMEForFlash();
- CoUninitialize();
#endif
return 0;

Powered by Google App Engine
This is Rietveld 408576698