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

Unified Diff: components/history/core/browser/history_querying_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/history_querying_unittest.cc
diff --git a/components/history/core/browser/history_querying_unittest.cc b/components/history/core/browser/history_querying_unittest.cc
index 535688c0fcdb96c424d24b4fe0ee46e64cf2fe6b..98dd62fa67ff4fe2e477e1edf0938747dd17a375 100644
--- a/components/history/core/browser/history_querying_unittest.cc
+++ b/components/history/core/browser/history_querying_unittest.cc
@@ -180,7 +180,8 @@ class HistoryQueryTest : public testing::Test {
void TearDown() override {
if (history_) {
- history_->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure());
+ history_->SetOnBackendDestroyTask(
+ base::MessageLoop::QuitWhenIdleClosure());
history_->Cleanup();
history_.reset();
base::MessageLoop::current()->Run(); // Wait for the other thread.
@@ -189,7 +190,8 @@ class HistoryQueryTest : public testing::Test {
void QueryHistoryComplete(QueryResults* results) {
results->Swap(&last_query_results_);
- base::MessageLoop::current()->Quit(); // Will return out to QueryHistory.
+ base::MessageLoop::current()
+ ->QuitWhenIdle(); // Will return out to QueryHistory.
}
base::ScopedTempDir temp_dir_;

Powered by Google App Engine
This is Rietveld 408576698