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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (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: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index f196614ac658621897f7c588eca2cb2c2da59db8..2bef2be858a504de37aff4a873389cd4924d45b8 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -141,7 +141,9 @@ class QuittingHistoryDBTask : public history::HistoryDBTask {
return true;
}
- void DoneRunOnMainThread() override { base::MessageLoop::current()->Quit(); }
+ void DoneRunOnMainThread() override {
+ base::MessageLoop::current()->QuitWhenIdle();
+ }
private:
~QuittingHistoryDBTask() override {}
@@ -560,7 +562,8 @@ void TestingProfile::DestroyHistoryService() {
return;
history_service->ClearCachedDataForContextID(0);
- history_service->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure());
+ history_service->SetOnBackendDestroyTask(
+ base::MessageLoop::QuitWhenIdleClosure());
history_service->Cleanup();
HistoryServiceFactory::ShutdownForProfile(this);
@@ -573,7 +576,7 @@ void TestingProfile::DestroyHistoryService() {
// Make sure we don't have any event pending that could disrupt the next
// test.
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::MessageLoop::QuitClosure());
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
base::MessageLoop::current()->Run();
}
« no previous file with comments | « chrome/test/base/interactive_test_utils_views.cc ('k') | chrome/test/chromedriver/net/websocket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698