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

Unified Diff: chrome/browser/chrome_thread.h

Issue 1800008: Created a MessageLoopProxy interface. This provides a thread-safe refcounted ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « base/message_loop_proxy.h ('k') | chrome/browser/chrome_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_thread.h
===================================================================
--- chrome/browser/chrome_thread.h (revision 45861)
+++ chrome/browser/chrome_thread.h (working copy)
@@ -9,6 +9,8 @@
#include "base/task.h"
#include "base/thread.h"
+class MessageLoopProxy;
+
///////////////////////////////////////////////////////////////////////////////
// ChromeThread
//
@@ -126,6 +128,11 @@
// sets identifier to its ID. Otherwise returns false.
static bool GetCurrentThreadIdentifier(ID* identifier);
+ // Callers can hold on to a refcounted MessageLoopProxy beyond the lifetime
+ // of the thread.
+ static scoped_refptr<MessageLoopProxy> GetMessageLoopProxyForThread(
+ ID identifier);
+
// Use these templates in conjuction with RefCountedThreadSafe when you want
// to ensure that an object is deleted on a specific thread. This is needed
// when an object can hop between threads (i.e. IO -> FILE -> IO), and thread
« no previous file with comments | « base/message_loop_proxy.h ('k') | chrome/browser/chrome_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698