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

Unified Diff: chrome/browser/download/save_page_browsertest.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/browser/download/save_page_browsertest.cc
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 67ba540264c7f25e972b1f065888092133f07788..d1f0cf312a64795e3f30d1b4e388f78b0ba7a207 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -96,7 +96,7 @@ class DownloadPersistedObserver : public DownloadHistory::Observer {
const history::DownloadRow& info) override {
persisted_ = persisted_ || filter_.Run(item, info);
if (persisted_ && waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
private:
@@ -134,7 +134,7 @@ class DownloadRemovedObserver : public DownloadPersistedObserver {
void OnDownloadsRemoved(const DownloadHistory::IdSet& ids) override {
removed_ = ids.find(download_id_) != ids.end();
if (removed_ && waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
private:
@@ -230,14 +230,14 @@ class DownloadItemCreatedObserver : public DownloadManager::Observer {
items_seen_.push_back(item);
if (waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
void ManagerGoingDown(DownloadManager* manager) override {
manager_->RemoveObserver(this);
manager_ = NULL;
if (waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
bool waiting_;
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/activity_log/activity_log_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698