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

Unified Diff: content/public/test/download_test_observer.cc

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (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
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/public/test/javascript_test_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/download_test_observer.cc
diff --git a/content/public/test/download_test_observer.cc b/content/public/test/download_test_observer.cc
index 5873df027e24a64a22a2fdaed112b58a55607cdc..96902a1084c6fd88095809277df57dc847061310 100644
--- a/content/public/test/download_test_observer.cc
+++ b/content/public/test/download_test_observer.cc
@@ -49,7 +49,7 @@ void DownloadUpdatedObserver::OnDownloadUpdated(DownloadItem* item) {
if (filter_.Run(item_))
event_seen_ = true;
if (waiting_ && event_seen_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
void DownloadUpdatedObserver::OnDownloadDestroyed(DownloadItem* item) {
@@ -57,7 +57,7 @@ void DownloadUpdatedObserver::OnDownloadDestroyed(DownloadItem* item) {
item_->RemoveObserver(this);
item_ = NULL;
if (waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
DownloadTestObserver::DownloadTestObserver(
@@ -216,7 +216,7 @@ void DownloadTestObserver::DownloadInFinalState(DownloadItem* download) {
void DownloadTestObserver::SignalIfFinished() {
if (waiting_ && IsFinished())
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
void DownloadTestObserver::AcceptDangerousDownload(uint32 download_id) {
@@ -406,8 +406,8 @@ void DownloadTestFlushObserver::PingIOThread(int cycle) {
BrowserThread::UI, FROM_HERE,
base::Bind(&DownloadTestFlushObserver::PingFileThread, this, cycle));
} else {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
}
@@ -443,7 +443,7 @@ void DownloadTestItemCreationObserver::DownloadItemCreationCallback(
DCHECK_EQ(1u, called_back_count_);
if (waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
const DownloadUrlParameters::OnStartedCallback
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/public/test/javascript_test_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698