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

Unified Diff: base/cancelable_callback.h

Issue 2354333002: Remove calls to MessageLoop(ForUI|ForIO)::Run/RunUntilIdle. (Closed)
Patch Set: fix build error Created 4 years, 3 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 | « no previous file | base/memory/memory_pressure_monitor_chromeos_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/cancelable_callback.h
diff --git a/base/cancelable_callback.h b/base/cancelable_callback.h
index 0034fddccd3f218d45ffaac4734101550892ec08..13cbd0c2139e10755e863bd3402a4ff4459db0e3 100644
--- a/base/cancelable_callback.h
+++ b/base/cancelable_callback.h
@@ -26,16 +26,18 @@
// to the message loop, the intensive test runs, the message loop is run,
// then the callback is cancelled.
//
+// RunLoop run_loop;
+//
// void TimeoutCallback(const std::string& timeout_message) {
// FAIL() << timeout_message;
-// MessageLoop::current()->QuitWhenIdle();
+// run_loop.QuitWhenIdle();
// }
//
// CancelableClosure timeout(base::Bind(&TimeoutCallback, "Test timed out."));
-// MessageLoop::current()->PostDelayedTask(FROM_HERE, timeout.callback(),
-// 4000) // 4 seconds to run.
+// ThreadTaskRunnerHandle::Get()->PostDelayedTask(FROM_HERE, timeout.callback(),
+// TimeDelta::FromSeconds(4));
// RunIntensiveTest();
-// MessageLoop::current()->Run();
+// run_loop.Run();
// timeout.Cancel(); // Hopefully this is hit before the timeout callback runs.
//
« no previous file with comments | « no previous file | base/memory/memory_pressure_monitor_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698