| Index: base/message_loop/message_loop.cc
|
| diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
|
| index 4fecbc5a60383ac5c5a6cd84b92edac99afa6223..0eb24cf7d2f89641950bf36ba7768ca7d2dc7ccc 100644
|
| --- a/base/message_loop/message_loop.cc
|
| +++ b/base/message_loop/message_loop.cc
|
| @@ -170,7 +170,6 @@
|
| // Tell the incoming queue that we are dying.
|
| incoming_task_queue_->WillDestroyCurrentMessageLoop();
|
| incoming_task_queue_ = NULL;
|
| - unbound_task_runner_ = NULL;
|
| task_runner_ = NULL;
|
|
|
| // OK, now make it so that no one can find us.
|
| @@ -368,7 +367,6 @@
|
|
|
| //------------------------------------------------------------------------------
|
|
|
| -// static
|
| scoped_ptr<MessageLoop> MessageLoop::CreateUnbound(
|
| Type type, MessagePumpFactoryCallback pump_factory) {
|
| return make_scoped_ptr(new MessageLoop(type, pump_factory));
|
| @@ -388,9 +386,7 @@
|
| message_histogram_(NULL),
|
| run_loop_(NULL),
|
| incoming_task_queue_(new internal::IncomingTaskQueue(this)),
|
| - unbound_task_runner_(
|
| - new internal::MessageLoopTaskRunner(incoming_task_queue_)),
|
| - task_runner_(unbound_task_runner_) {
|
| + task_runner_(new internal::MessageLoopTaskRunner(incoming_task_queue_)) {
|
| // If type is TYPE_CUSTOM non-null pump_factory must be given.
|
| DCHECK_EQ(type_ == TYPE_CUSTOM, !pump_factory_.is_null());
|
| }
|
| @@ -406,19 +402,7 @@
|
| lazy_tls_ptr.Pointer()->Set(this);
|
|
|
| incoming_task_queue_->StartScheduling();
|
| - unbound_task_runner_->BindToCurrentThread();
|
| - SetTaskRunner(unbound_task_runner_.Pass());
|
| -}
|
| -
|
| -void MessageLoop::SetTaskRunner(
|
| - scoped_refptr<SingleThreadTaskRunner> task_runner) {
|
| - DCHECK_EQ(this, current());
|
| - DCHECK(task_runner->BelongsToCurrentThread());
|
| - DCHECK(!unbound_task_runner_);
|
| - task_runner_ = task_runner.Pass();
|
| - // Clear the previous thread task runner first because only one can exist at
|
| - // a time.
|
| - thread_task_runner_handle_.reset();
|
| + task_runner_->BindToCurrentThread();
|
| thread_task_runner_handle_.reset(new ThreadTaskRunnerHandle(task_runner_));
|
| }
|
|
|
|
|