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

Unified Diff: components/history/core/browser/top_sites_impl_unittest.cc

Issue 1402553002: Don't use base::MessageLoop::{Quit,QuitClosure} in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: components/history/core/browser/top_sites_impl_unittest.cc
diff --git a/components/history/core/browser/top_sites_impl_unittest.cc b/components/history/core/browser/top_sites_impl_unittest.cc
index f6dc42e2b23bb18906df06db2650fb760aae86a8..de40df0b7d0ee1ae0fd462814df59b0f16123538 100644
--- a/components/history/core/browser/top_sites_impl_unittest.cc
+++ b/components/history/core/browser/top_sites_impl_unittest.cc
@@ -53,7 +53,9 @@ class WaitForHistoryTask : public HistoryDBTask {
return true;
}
- void DoneRunOnMainThread() override { base::MessageLoop::current()->Quit(); }
+ void DoneRunOnMainThread() override {
+ base::MessageLoop::current()->QuitWhenIdle();
+ }
private:
~WaitForHistoryTask() override {}
@@ -104,7 +106,7 @@ class TopSitesQuerier {
urls_ = data;
number_of_callbacks_++;
if (waiting_) {
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
waiting_ = false;
}
}
@@ -211,7 +213,7 @@ class TopSitesImplTest : public HistoryUnitTestBase {
// Quit the current message loop when invoked. Useful when running a nested
// message loop.
- void QuitCallback() { base::MessageLoop::current()->Quit(); }
+ void QuitCallback() { base::MessageLoop::current()->QuitWhenIdle(); }
// Adds a page to history.
void AddPageToHistory(const GURL& url) {

Powered by Google App Engine
This is Rietveld 408576698