summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authorki.stfu <ki.stfu@gmail.com>2015-10-09 13:40:20 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-09 20:41:11 +0000
commitc4f8e240ff989382ac3a1ad994fd6098fbb0b0a1 (patch)
treef0053d441db726ec25c41dda503e6324c4059f75 /chrome/service
parent116fe2ebd62c23e1d99a57020705865d0da9258a (diff)
downloadchromium_src-c4f8e240ff989382ac3a1ad994fd6098fbb0b0a1.zip
chromium_src-c4f8e240ff989382ac3a1ad994fd6098fbb0b0a1.tar.gz
chromium_src-c4f8e240ff989382ac3a1ad994fd6098fbb0b0a1.tar.bz2
Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/
This patch renames base::MessageLoop::{Quit,QuitClosure} to base::MessageLoop::{QuitWhenIdle,QuitWhenIdleClosure}. BUG=131220 TEST= R=thestig@chromium.org Review URL: https://codereview.chromium.org/1395103003 Cr-Commit-Position: refs/heads/master@{#353376}
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc15
-rw-r--r--chrome/service/service_process.cc4
2 files changed, 12 insertions, 7 deletions
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
index 7d7c657..6bc7b37 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
@@ -255,7 +255,8 @@ CloudPrintURLFetcherBasicTest::HandleRawResponse(
if (handle_raw_response_) {
// If the current message loop is not the IO loop, it will be shut down when
// the main loop returns and this thread subsequently goes out of scope.
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
return CloudPrintURLFetcher::STOP_PROCESSING;
}
return CloudPrintURLFetcher::CONTINUE_PROCESSING;
@@ -269,7 +270,8 @@ CloudPrintURLFetcherBasicTest::HandleRawData(
// We should never get here if we returned true in HandleRawResponse
EXPECT_FALSE(handle_raw_response_);
if (handle_raw_data_) {
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
return CloudPrintURLFetcher::STOP_PROCESSING;
}
return CloudPrintURLFetcher::CONTINUE_PROCESSING;
@@ -284,7 +286,8 @@ CloudPrintURLFetcherBasicTest::HandleJSONData(
// We should never get here if we returned true in one of the above methods.
EXPECT_FALSE(handle_raw_response_);
EXPECT_FALSE(handle_raw_data_);
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
return CloudPrintURLFetcher::STOP_PROCESSING;
}
@@ -302,7 +305,8 @@ CloudPrintURLFetcherOverloadTest::HandleRawData(
// We have already sent 20 requests continuously. And we expect that
// it takes more than 1 second due to the overload protection settings.
EXPECT_TRUE(Time::Now() - start_time_ >= one_second);
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
return CloudPrintURLFetcher::STOP_PROCESSING;
}
@@ -321,7 +325,8 @@ CloudPrintURLFetcherRetryBackoffTest::HandleRawData(
void CloudPrintURLFetcherRetryBackoffTest::OnRequestGiveUp() {
// It takes more than 200 ms to finish all 11 requests.
EXPECT_TRUE(Time::Now() - start_time_ >= TimeDelta::FromMilliseconds(200));
- io_task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ io_task_runner()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitWhenIdleClosure());
}
TEST_F(CloudPrintURLFetcherBasicTest, HandleRawResponse) {
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index 0725a54..b2d99dd 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -264,8 +264,8 @@ void ServiceProcess::Shutdown() {
}
void ServiceProcess::Terminate() {
- main_message_loop_->task_runner()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
+ main_message_loop_->task_runner()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
void ServiceProcess::OnShutdown() {