Index: chrome/browser/download/download_browsertest.cc |
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc |
index 9abd16faa5a119912c336bb6664aed1a1191bbf5..690bf411e1bc7faef6cff1e02cc65deec4fdd216 100644 |
--- a/chrome/browser/download/download_browsertest.cc |
+++ b/chrome/browser/download/download_browsertest.cc |
@@ -145,7 +145,7 @@ class CreatedObserver : public content::DownloadManager::Observer { |
content::DownloadItem* item) override { |
DCHECK_EQ(manager_, manager); |
if (waiting_) |
- base::MessageLoopForUI::current()->Quit(); |
+ base::MessageLoopForUI::current()->QuitWhenIdle(); |
} |
content::DownloadManager* manager_; |
@@ -187,10 +187,10 @@ class PercentWaiter : public content::DownloadItem::Observer { |
(item_->PercentComplete() != 100)))) { |
error_ = true; |
if (waiting_) |
- base::MessageLoopForUI::current()->Quit(); |
+ base::MessageLoopForUI::current()->QuitWhenIdle(); |
} |
if (item_->GetState() == DownloadItem::COMPLETE && waiting_) |
- base::MessageLoopForUI::current()->Quit(); |
+ base::MessageLoopForUI::current()->QuitWhenIdle(); |
} |
void OnDownloadDestroyed(content::DownloadItem* item) override { |
@@ -274,7 +274,7 @@ class DownloadsHistoryDataCollector { |
scoped_ptr<std::vector<history::DownloadRow> > entries) { |
result_valid_ = true; |
results_ = entries.Pass(); |
- base::MessageLoopForUI::current()->Quit(); |
+ base::MessageLoopForUI::current()->QuitWhenIdle(); |
} |
Profile* profile_; |
@@ -298,7 +298,7 @@ class MockAbortExtensionInstallPrompt : public ExtensionInstallPrompt { |
const Extension* extension, |
const ShowDialogCallback& show_dialog_callback) override { |
delegate->InstallUIAbort(true); |
- base::MessageLoopForUI::current()->Quit(); |
+ base::MessageLoopForUI::current()->QuitWhenIdle(); |
} |
void OnInstallSuccess(const Extension* extension, SkBitmap* icon) override {} |
@@ -395,7 +395,7 @@ class HistoryObserver : public DownloadHistory::Observer { |
seen_stored_ = true; |
if (waiting_) |
- base::MessageLoopForUI::current()->Quit(); |
+ base::MessageLoopForUI::current()->QuitWhenIdle(); |
} |
void OnDownloadHistoryDestroyed() override { |
@@ -1109,8 +1109,8 @@ class DownloadTest : public InProcessBrowserTest { |
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 test data. |
@@ -3553,7 +3553,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTestWithShelf, PRE_DownloadTest_History) { |
HistoryServiceFactory::GetForProfile(browser()->profile(), |
ServiceAccessType::IMPLICIT_ACCESS) |
->FlushForTest(base::Bind( |
- &base::MessageLoop::Quit, |
+ &base::MessageLoop::QuitWhenIdle, |
base::Unretained(base::MessageLoop::current()->current()))); |
content::RunMessageLoop(); |
} |