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

Unified Diff: base/deferred_sequenced_task_runner_unittest.cc

Issue 1113953002: Revert of base: Remove use of MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « base/critical_closure.h ('k') | base/files/file_path_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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|
« no previous file with comments | « base/critical_closure.h ('k') | base/files/file_path_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698