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

Unified Diff: jingle/glue/thread_wrapper.h

Issue 10823224: Update JingleThreadWrapper to allow it to be created using task runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | jingle/glue/thread_wrapper.cc » ('j') | jingle/glue/thread_wrapper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/thread_wrapper.h
diff --git a/jingle/glue/thread_wrapper.h b/jingle/glue/thread_wrapper.h
index 284c7622736ad065cc1d18e53758fd71c0ce7178..0e93ae101f85a572ccbfc7ed2a83d0dee129fd8b 100644
--- a/jingle/glue/thread_wrapper.h
+++ b/jingle/glue/thread_wrapper.h
@@ -25,8 +25,9 @@ class JingleThreadWrapper
: public MessageLoop::DestructionObserver,
public talk_base::Thread {
public:
- // Create JingleThreadWrapper for the current thread if it hasn't
- // been created yet.
+ // Create JingleThreadWrapper for the current thread if it hasn't been created
+ // yet. The task runner is destroyed automatically when the current
+ // MessageLoop is destroyed.
Wez 2012/08/09 23:30:25 I think you mean that the ThreadWrapper will be de
Sergey Ulanov 2012/08/13 21:15:34 Done.
static void EnsureForCurrentThread();
Wez 2012/08/09 23:30:25 This should probably become EnsureForCurrentMessag
Sergey Ulanov 2012/08/13 21:15:34 Good point. Done.
// Returns thread wrapper for the current thread. NULL is returned
@@ -34,7 +35,7 @@ class JingleThreadWrapper
// thread.
static JingleThreadWrapper* current();
- JingleThreadWrapper(MessageLoop* message_loop);
+ JingleThreadWrapper(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
Wez 2012/08/09 23:30:25 nit: explicit
Sergey Ulanov 2012/08/13 21:15:34 Done.
// Sets whether the thread can be used to send messages
// synchronously to another thread using Send() method. Set to false
@@ -98,8 +99,8 @@ class JingleThreadWrapper
void RunTask(int task_id);
void ProcessPendingSends();
- // Chromium thread used to execute messages posted on this thread.
- MessageLoop* message_loop_;
+ // Task runner used to execute messages posted on this thread.
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
bool send_allowed_;
« no previous file with comments | « no previous file | jingle/glue/thread_wrapper.cc » ('j') | jingle/glue/thread_wrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698