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

Unified Diff: content/browser/download/download_browsertest.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
Index: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index fea996e5d65af6ebea15da60c4f2f65658d02cd6..a8f0efe45825419d61b534a89159e0abc07e6748 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -255,7 +255,7 @@ void DownloadFileWithDelayFactory::AddRenameCallback(base::Closure callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
rename_callbacks_.push_back(callback);
if (waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
void DownloadFileWithDelayFactory::GetAllRenameCallbacks(
@@ -311,10 +311,9 @@ class CountingDownloadFile : public DownloadFileImpl {
static int GetNumberActiveFilesFromFileThread() {
int result = -1;
BrowserThread::PostTaskAndReply(
- BrowserThread::FILE,
- FROM_HERE,
+ BrowserThread::FILE, FROM_HERE,
base::Bind(&CountingDownloadFile::GetNumberActiveFiles, &result),
- base::MessageLoop::current()->QuitClosure());
+ base::MessageLoop::current()->QuitWhenIdleClosure());
base::MessageLoop::current()->Run();
DCHECK_NE(-1, result);
return result;
@@ -466,7 +465,7 @@ class DownloadCreateObserver : DownloadManager::Observer {
item_ = download;
if (waiting_)
- base::MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->QuitWhenIdle();
}
DownloadItem* WaitForFinished() {
@@ -745,8 +744,8 @@ class DownloadContentTest : public ContentBrowserTest {
static void EnsureNoPendingDownloadJobsOnIO(bool* result) {
if (net::URLRequestSlowDownloadJob::NumberOutstandingRequests())
*result = false;
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
// Location of the downloads directory for these tests
« no previous file with comments | « content/browser/devtools/devtools_manager_unittest.cc ('k') | content/browser/download/download_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698