Chromium Code Reviews| 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_; |