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

Unified Diff: base/observer_list_unittest.cc

Issue 1100773004: base: Remove most uses of MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing includes. 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/observer_list_threadsafe.h ('k') | base/posix/unix_domain_socket_linux_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/observer_list_unittest.cc
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc
index ea916b1a9c4c53244aad92a88e7c089dbcd5a20a..2e51e455216b96d077c0b27bd656daaf317be51c 100644
--- a/base/observer_list_unittest.cc
+++ b/base/observer_list_unittest.cc
@@ -8,9 +8,10 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/location.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/platform_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -107,7 +108,7 @@ class AddRemoveThread : public PlatformThread::Delegate,
void ThreadMain() override {
loop_ = new MessageLoop(); // Fire up a message loop.
- loop_->PostTask(
+ loop_->task_runner()->PostTask(
FROM_HERE,
base::Bind(&AddRemoveThread::AddTask, weak_factory_.GetWeakPtr()));
loop_->Run();
@@ -137,13 +138,14 @@ class AddRemoveThread : public PlatformThread::Delegate,
list_->Notify(FROM_HERE, &Foo::Observe, 10);
}
- loop_->PostTask(
+ loop_->task_runner()->PostTask(
FROM_HERE,
base::Bind(&AddRemoveThread::AddTask, weak_factory_.GetWeakPtr()));
}
void Quit() {
- loop_->PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure());
+ loop_->task_runner()->PostTask(FROM_HERE,
+ MessageLoop::QuitWhenIdleClosure());
}
void Observe(int x) override {
« no previous file with comments | « base/observer_list_threadsafe.h ('k') | base/posix/unix_domain_socket_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698