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

Unified Diff: content/common/child_thread.h

Issue 8785013: Track webcore worker message loops in chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lazy-init and leak worker task runner Created 9 years 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 | content/common/child_thread.cc » ('j') | content/common/worker_task_runner.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_thread.h
diff --git a/content/common/child_thread.h b/content/common/child_thread.h
index acb1e3ab4781dd23cdeea83afbca6489fa032bd2..ab1c0698cf02919706f232595160dfef04d4d685 100644
--- a/content/common/child_thread.h
+++ b/content/common/child_thread.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/basictypes.h"
+#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/shared_memory.h"
#include "content/common/content_export.h"
@@ -18,6 +19,7 @@ class MessageLoop;
class QuotaDispatcher;
class ResourceDispatcher;
class SocketStreamDispatcher;
+class WorkerTaskRunner;
namespace IPC {
class SyncChannel;
@@ -79,6 +81,8 @@ class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener,
// Returns the one child thread.
static ChildThread* current();
+ WorkerTaskRunner* worker_task_runner() const;
+
protected:
friend class ChildProcess;
@@ -140,6 +144,10 @@ class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener,
scoped_ptr<QuotaDispatcher> quota_dispatcher_;
+ static base::LazyInstance<WorkerTaskRunner,
dgrogan 2011/12/07 22:47:39 I don't think this needs to be static, but LazyIns
michaeln 2011/12/07 23:57:38 LazyInstances are pretty much always static. They'
+ base::LeakyLazyInstanceTraits<WorkerTaskRunner> >
+ worker_task_runner_;
+
DISALLOW_COPY_AND_ASSIGN(ChildThread);
};
« no previous file with comments | « no previous file | content/common/child_thread.cc » ('j') | content/common/worker_task_runner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698