Index: base/deferred_sequenced_task_runner_unittest.cc |
diff --git a/base/deferred_sequenced_task_runner_unittest.cc b/base/deferred_sequenced_task_runner_unittest.cc |
index 6e17ad93a8fc89e27cd45ba6065ced5d08a5c9de..81f2a0a00c9beb39b0934ce4e942d6bfd9671837 100644 |
--- a/base/deferred_sequenced_task_runner_unittest.cc |
+++ b/base/deferred_sequenced_task_runner_unittest.cc |
@@ -7,9 +7,9 @@ |
#include "base/basictypes.h" |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
-#include "base/location.h" |
#include "base/memory/ref_counted.h" |
-#include "base/single_thread_task_runner.h" |
+#include "base/message_loop/message_loop.h" |
+#include "base/message_loop/message_loop_proxy.h" |
#include "base/threading/non_thread_safe.h" |
#include "base/threading/thread.h" |
#include "testing/gmock/include/gmock/gmock.h" |
@@ -58,9 +58,11 @@ |
} |
protected: |
- DeferredSequencedTaskRunnerTest() |
- : loop_(), |
- runner_(new base::DeferredSequencedTaskRunner(loop_.task_runner())) {} |
+ DeferredSequencedTaskRunnerTest() : |
+ loop_(), |
+ runner_( |
+ new base::DeferredSequencedTaskRunner(loop_.message_loop_proxy())) { |
+ } |
base::MessageLoop loop_; |
scoped_refptr<base::DeferredSequencedTaskRunner> runner_; |
@@ -124,18 +126,21 @@ |
thread1.Start(); |
thread2.Start(); |
for (int i = 0; i < 5; ++i) { |
- thread1.task_runner()->PostTask( |
+ thread1.message_loop()->PostTask( |
FROM_HERE, |
base::Bind(&DeferredSequencedTaskRunnerTest::PostExecuteTask, |
- base::Unretained(this), 2 * i)); |
- thread2.task_runner()->PostTask( |
+ base::Unretained(this), |
+ 2 * i)); |
+ thread2.message_loop()->PostTask( |
FROM_HERE, |
base::Bind(&DeferredSequencedTaskRunnerTest::PostExecuteTask, |
- base::Unretained(this), 2 * i + 1)); |
+ base::Unretained(this), |
+ 2 * i + 1)); |
if (i == 2) { |
- thread1.task_runner()->PostTask( |
- FROM_HERE, base::Bind(&DeferredSequencedTaskRunnerTest::StartRunner, |
- base::Unretained(this))); |
+ thread1.message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&DeferredSequencedTaskRunnerTest::StartRunner, |
+ base::Unretained(this))); |
} |
} |
} |
@@ -149,7 +154,8 @@ |
{ |
base::Thread thread("DeferredSequencedTaskRunnerTestThread"); |
thread.Start(); |
- runner_ = new base::DeferredSequencedTaskRunner(thread.task_runner()); |
+ runner_ = |
+ new base::DeferredSequencedTaskRunner(thread.message_loop_proxy()); |
for (int i = 0; i < 5; ++i) { |
{ |
// Use a block to ensure that no reference to |short_lived_object| |