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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 242513006: Support COM in SequencedWorkerPool. This will be used by some code that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 8 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 | « no previous file | base/win/scoped_com_initializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.cc
===================================================================
--- base/threading/sequenced_worker_pool.cc (revision 264688)
+++ base/threading/sequenced_worker_pool.cc (working copy)
@@ -32,6 +32,8 @@
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
+#elif defined(OS_WIN)
+#include "base/win/scoped_com_initializer.h"
#endif
#if !defined(OS_NACL)
@@ -491,6 +493,11 @@
}
void SequencedWorkerPool::Worker::Run() {
+#if defined(OS_WIN)
+ scoped_ptr<win::ScopedCOMInitializer> com_initializer(
darin (slow to review) 2014/04/19 04:49:07 nit: why heap allocate? why bother with |new| and
Peter Kasting 2014/04/21 20:38:37 Probably because I was copying code from elsewhere
+ new win::ScopedCOMInitializer());
+#endif
+
// Store a pointer to the running sequence in thread local storage for
// static function access.
g_lazy_tls_ptr.Get().Set(&running_sequence_);
« no previous file with comments | « no previous file | base/win/scoped_com_initializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698