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

Unified Diff: chrome/browser/metrics/thread_watcher_unittest.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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 | « chrome/browser/metrics/thread_watcher.cc ('k') | chrome/browser/net/chrome_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher_unittest.cc
diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc
index 00171b8052257fba0f31b0854d259b2b9fb5df30..464dbfd2da196722058eaa102a59f4bca15158de 100644
--- a/chrome/browser/metrics/thread_watcher_unittest.cc
+++ b/chrome/browser/metrics/thread_watcher_unittest.cc
@@ -6,11 +6,12 @@
#include "base/basictypes.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_tokenizer.h"
@@ -700,9 +701,8 @@ TEST_F(ThreadWatcherListTest, Restart) {
// g_thread_watcher_list_ later on.
ThreadWatcherList::StartWatchingAll(*base::CommandLine::ForCurrentProcess());
ThreadWatcherList::StopWatchingAll();
- message_loop_for_ui.PostDelayedTask(
- FROM_HERE,
- message_loop_for_ui.QuitClosure(),
+ message_loop_for_ui.task_runner()->PostDelayedTask(
+ FROM_HERE, message_loop_for_ui.QuitClosure(),
base::TimeDelta::FromSeconds(
ThreadWatcherList::g_initialize_delay_seconds));
message_loop_for_ui.Run();
@@ -713,9 +713,8 @@ TEST_F(ThreadWatcherListTest, Restart) {
// Proceed with just |StartWatchingAll| and ensure it'll be started.
ThreadWatcherList::StartWatchingAll(*base::CommandLine::ForCurrentProcess());
- message_loop_for_ui.PostDelayedTask(
- FROM_HERE,
- message_loop_for_ui.QuitClosure(),
+ message_loop_for_ui.task_runner()->PostDelayedTask(
+ FROM_HERE, message_loop_for_ui.QuitClosure(),
base::TimeDelta::FromSeconds(
ThreadWatcherList::g_initialize_delay_seconds + 1));
message_loop_for_ui.Run();
@@ -726,9 +725,8 @@ TEST_F(ThreadWatcherListTest, Restart) {
// Finally, StopWatchingAll() must stop.
ThreadWatcherList::StopWatchingAll();
- message_loop_for_ui.PostDelayedTask(
- FROM_HERE,
- message_loop_for_ui.QuitClosure(),
+ message_loop_for_ui.task_runner()->PostDelayedTask(
+ FROM_HERE, message_loop_for_ui.QuitClosure(),
base::TimeDelta::FromSeconds(
ThreadWatcherList::g_initialize_delay_seconds));
message_loop_for_ui.Run();
« no previous file with comments | « chrome/browser/metrics/thread_watcher.cc ('k') | chrome/browser/net/chrome_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698