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

Unified Diff: content/public/browser/browser_thread.h

Issue 2558943002: Explicitly make BrowserThread::SetDelegate specific to the IO thread. (Closed)
Patch Set: Created 4 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 | « content/browser/browser_thread_impl.cc ('k') | content/public/browser/browser_thread_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_thread.h
diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h
index 74874dd2996892a50695b722ebf59874b307a8f0..e31797af858eacd0a79c10e531631b42f12045a7 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -222,15 +222,19 @@ class CONTENT_EXPORT BrowserThread {
static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunnerForThread(
ID identifier);
- // Sets the delegate for the specified BrowserThread.
+ // Sets the delegate for BrowserThread::IO.
//
- // Only one delegate may be registered at a time. Delegates may be
+ // This only supports the IO thread as it doesn't work for potentially
+ // redirected threads (ref. http://crbug.com/653916) and also doesn't make
+ // sense for the UI thread.
+ //
+ // Only one delegate may be registered at a time. The delegate may be
// unregistered by providing a nullptr pointer.
//
- // If the caller unregisters a delegate before CleanUp has been
- // called, it must perform its own locking to ensure the delegate is
- // not deleted while unregistering.
- static void SetDelegate(ID identifier, BrowserThreadDelegate* delegate);
+ // If the caller unregisters the delegate before CleanUp has been called, it
+ // must perform its own locking to ensure the delegate is not deleted while
+ // unregistering.
+ static void SetIOThreadDelegate(BrowserThreadDelegate* delegate);
// Use these templates in conjunction with RefCountedThreadSafe or scoped_ptr
// when you want to ensure that an object is deleted on a specific thread.
« no previous file with comments | « content/browser/browser_thread_impl.cc ('k') | content/public/browser/browser_thread_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698