summaryrefslogtreecommitdiffstats
path: root/remoting/base
diff options
context:
space:
mode:
authorki.stfu <ki.stfu@gmail.com>2015-10-12 13:10:06 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-12 20:10:46 +0000
commit659c758f070333905acee302474fb4bc2ce1ba46 (patch)
treee9befb9bfa5d3e9d50bc180a842563e0294c229d /remoting/base
parentaa33a9648c5684a43564294d35dd18ee056806c5 (diff)
downloadchromium_src-659c758f070333905acee302474fb4bc2ce1ba46.zip
chromium_src-659c758f070333905acee302474fb4bc2ce1ba46.tar.gz
chromium_src-659c758f070333905acee302474fb4bc2ce1ba46.tar.bz2
Don't use base::MessageLoop::{Quit,QuitClosure} in remoting/
This patch renames base::MessageLoop::{Quit,QuitClosure} to base::MessageLoop::{QuitWhenIdle,QuitWhenIdleClosure}. BUG=131220 TEST= R=joedow@chromium.org Review URL: https://codereview.chromium.org/1394803004 Cr-Commit-Position: refs/heads/master@{#353583}
Diffstat (limited to 'remoting/base')
-rw-r--r--remoting/base/auto_thread.cc4
-rw-r--r--remoting/base/auto_thread.h2
-rw-r--r--remoting/base/auto_thread_task_runner_unittest.cc2
-rw-r--r--remoting/base/auto_thread_unittest.cc4
4 files changed, 6 insertions, 6 deletions
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc
index 828ece4..b0c6268 100644
--- a/remoting/base/auto_thread.cc
+++ b/remoting/base/auto_thread.cc
@@ -164,7 +164,7 @@ void AutoThread::QuitThread(
return;
}
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
was_quit_properly_ = true;
if (joiner_.get()) {
@@ -207,7 +207,7 @@ void AutoThread::ThreadMain() {
message_loop.Run();
- // Assert that MessageLoop::Quit was called by AutoThread::QuitThread.
+ // Assert that MessageLoop::QuitWhenIdle was called by AutoThread::QuitThread.
DCHECK(was_quit_properly_);
}
diff --git a/remoting/base/auto_thread.h b/remoting/base/auto_thread.h
index 9e6baef..a6c0e56 100644
--- a/remoting/base/auto_thread.h
+++ b/remoting/base/auto_thread.h
@@ -101,7 +101,7 @@ class AutoThread : base::PlatformThread::Delegate {
std::string name_;
// Flag used to indicate whether MessageLoop was quit properly.
- // This allows us to detect premature exit via MessageLoop::Quit().
+ // This allows us to detect premature exit via MessageLoop::QuitWhenIdle().
bool was_quit_properly_;
// AutoThreadTaskRunner to post a task to to join & delete this thread.
diff --git a/remoting/base/auto_thread_task_runner_unittest.cc b/remoting/base/auto_thread_task_runner_unittest.cc
index eb779b6..9a1f712 100644
--- a/remoting/base/auto_thread_task_runner_unittest.cc
+++ b/remoting/base/auto_thread_task_runner_unittest.cc
@@ -22,7 +22,7 @@ TEST(AutoThreadTaskRunnerTest, StartAndStop) {
// Create a task runner.
base::MessageLoop message_loop;
scoped_refptr<AutoThreadTaskRunner> task_runner = new AutoThreadTaskRunner(
- message_loop.task_runner(), base::MessageLoop::QuitClosure());
+ message_loop.task_runner(), base::MessageLoop::QuitWhenIdleClosure());
// Post a task to make sure it is executed.
bool success = false;
diff --git a/remoting/base/auto_thread_unittest.cc b/remoting/base/auto_thread_unittest.cc
index 13f07ac..152db81 100644
--- a/remoting/base/auto_thread_unittest.cc
+++ b/remoting/base/auto_thread_unittest.cc
@@ -67,7 +67,7 @@ class AutoThreadTest : public testing::Test {
// task to |message_loop_| so the test will not hang on failure.
main_task_runner_ = NULL;
message_loop_.PostDelayedTask(FROM_HERE,
- base::MessageLoop::QuitClosure(),
+ base::MessageLoop::QuitWhenIdleClosure(),
base::TimeDelta::FromSeconds(5));
message_loop_.Run();
}
@@ -87,7 +87,7 @@ class AutoThreadTest : public testing::Test {
protected:
void QuitMainMessageLoop() {
message_loop_quit_correctly_ = true;
- message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+ message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
base::MessageLoop message_loop_;