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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 8341107: Change RenderThread to use ScopedCOMInitializer to initialize COM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
===================================================================
--- content/renderer/render_thread_impl.cc (revision 107714)
+++ content/renderer/render_thread_impl.cc (working copy)
@@ -21,6 +21,7 @@
#include "base/task.h"
#include "base/threading/thread_local.h"
#include "base/values.h"
+#include "base/win/scoped_com_initializer.h"
#include "content/common/appcache/appcache_dispatcher.h"
#include "content/common/child_process_messages.h"
#include "content/common/database_messages.h"
@@ -182,7 +183,7 @@
// If you are running plugins in this thread you need COM active but in
// the normal case you don't.
if (RenderProcessImpl::InProcessPlugins())
- CoInitialize(0);
+ initialize_com_.reset(new base::win::ScopedCOMInitializer());
#endif
// In single process the single process is all there is.
@@ -258,9 +259,6 @@
#if defined(OS_WIN)
// Clean up plugin channels before this thread goes away.
NPChannelBase::CleanupChannels();
- // Don't call COM if the renderer is in the sandbox.
- if (RenderProcessImpl::InProcessPlugins())
- CoUninitialize();
#endif
}
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698