summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/cancelable_callback.h2
-rw-r--r--base/file_util_proxy_unittest.cc12
-rw-r--r--base/message_loop_proxy_unittest.cc2
-rw-r--r--base/message_loop_unittest.cc16
-rw-r--r--base/message_pump_glib_unittest.cc10
-rw-r--r--base/synchronization/waitable_event_watcher_unittest.cc2
-rw-r--r--base/threading/thread.cc6
-rw-r--r--base/timer_unittest.cc10
-rw-r--r--base/win/object_watcher_unittest.cc2
9 files changed, 31 insertions, 31 deletions
diff --git a/base/cancelable_callback.h b/base/cancelable_callback.h
index b781677..acbffdd 100644
--- a/base/cancelable_callback.h
+++ b/base/cancelable_callback.h
@@ -28,7 +28,7 @@
//
// void TimeoutCallback(const std::string& timeout_message) {
// FAIL() << timeout_message;
-// MessageLoop::current()->Quit();
+// MessageLoop::current()->QuitWhenIdle();
// }
//
// CancelableClosure timeout(base::Bind(&TimeoutCallback, "Test timed out."));
diff --git a/base/file_util_proxy_unittest.cc b/base/file_util_proxy_unittest.cc
index ed54037..db215f0 100644
--- a/base/file_util_proxy_unittest.cc
+++ b/base/file_util_proxy_unittest.cc
@@ -40,7 +40,7 @@ class FileUtilProxyTest : public testing::Test {
void DidFinish(PlatformFileError error) {
error_ = error;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void DidCreateOrOpen(PlatformFileError error,
@@ -49,7 +49,7 @@ class FileUtilProxyTest : public testing::Test {
error_ = error;
file_ = file.ReleaseValue();
created_ = created;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void DidCreateTemporary(PlatformFileError error,
@@ -58,14 +58,14 @@ class FileUtilProxyTest : public testing::Test {
error_ = error;
file_ = file.ReleaseValue();
path_ = path;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void DidGetFileInfo(PlatformFileError error,
const PlatformFileInfo& file_info) {
error_ = error;
file_info_ = file_info;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void DidRead(PlatformFileError error,
@@ -74,14 +74,14 @@ class FileUtilProxyTest : public testing::Test {
error_ = error;
buffer_.resize(bytes_read);
memcpy(&buffer_[0], data, bytes_read);
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void DidWrite(PlatformFileError error,
int bytes_written) {
error_ = error;
bytes_written_ = bytes_written;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
protected:
diff --git a/base/message_loop_proxy_unittest.cc b/base/message_loop_proxy_unittest.cc
index 4776502..aaabef6 100644
--- a/base/message_loop_proxy_unittest.cc
+++ b/base/message_loop_proxy_unittest.cc
@@ -84,7 +84,7 @@ class MessageLoopProxyTest : public testing::Test {
static void RecordLoopAndQuit(scoped_refptr<LoopRecorder> recorder) {
recorder->RecordRun();
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void UnblockTaskThread() {
diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc
index ba37b2f..e7b8961 100644
--- a/base/message_loop_unittest.cc
+++ b/base/message_loop_unittest.cc
@@ -146,7 +146,7 @@ void RunTest_PostTask_SEH(MessageLoop::Type message_loop_type) {
static void SlowFunc(TimeDelta pause, int* quit_counter) {
PlatformThread::Sleep(pause);
if (--(*quit_counter) == 0)
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
// This function records the time when Run was called in a Time object, which is
@@ -341,7 +341,7 @@ void SubPumpFunc() {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void RunTest_PostDelayedTask_SharedTimer_SubPump() {
@@ -459,7 +459,7 @@ void NestingFunc(int* depth) {
MessageLoop::current()->SetNestableTasksAllowed(true);
MessageLoop::current()->Run();
}
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
#if defined(OS_WIN)
@@ -502,7 +502,7 @@ class Crasher : public base::RefCounted<Crasher> {
#error "needs architecture support"
#endif
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
// Points the bad array to a valid memory location.
static void FixError() {
@@ -726,7 +726,7 @@ void RecursiveSlowFunc(TaskList* order, int cookie, int depth,
void QuitFunc(TaskList* order, int cookie) {
order->RecordStart(QUITMESSAGELOOP, cookie);
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
order->RecordEnd(QUITMESSAGELOOP, cookie);
}
@@ -1780,7 +1780,7 @@ void PostNTasksThenQuit(int posts_remaining) {
FROM_HERE,
base::Bind(&PostNTasksThenQuit, posts_remaining - 1));
} else {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
}
@@ -1892,10 +1892,10 @@ namespace {
class QuitDelegate : public MessageLoopForIO::Watcher {
public:
virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
};
diff --git a/base/message_pump_glib_unittest.cc b/base/message_pump_glib_unittest.cc
index e23cc1e..4b6b6d4 100644
--- a/base/message_pump_glib_unittest.cc
+++ b/base/message_pump_glib_unittest.cc
@@ -311,7 +311,7 @@ class ConcurrentHelper : public base::RefCounted<ConcurrentHelper> {
--task_count_;
}
if (task_count_ == 0 && event_count_ == 0) {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
} else {
MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&ConcurrentHelper::FromTask, this));
@@ -323,7 +323,7 @@ class ConcurrentHelper : public base::RefCounted<ConcurrentHelper> {
--event_count_;
}
if (task_count_ == 0 && event_count_ == 0) {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
} else {
injector_->AddEventAsTask(
0, base::Bind(&ConcurrentHelper::FromEvent, this));
@@ -353,7 +353,7 @@ TEST_F(MessagePumpGLibTest, TestConcurrentEventPostedTask) {
// We use the helper class above. We keep both event and posted task queues
// full, the helper verifies that both tasks and events get processed.
// If that is not the case, either event_count_ or task_count_ will not get
- // to 0, and MessageLoop::Quit() will never be called.
+ // to 0, and MessageLoop::QuitWhenIdle() will never be called.
scoped_refptr<ConcurrentHelper> helper = new ConcurrentHelper(injector());
// Add 2 events to the queue to make sure it is always full (when we remove
@@ -514,7 +514,7 @@ void TestGLibLoopInternal(EventInjector* injector) {
ASSERT_EQ(3, task_count);
EXPECT_EQ(4, injector->processed_events());
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void TestGtkLoopInternal(EventInjector* injector) {
@@ -549,7 +549,7 @@ void TestGtkLoopInternal(EventInjector* injector) {
ASSERT_EQ(3, task_count);
EXPECT_EQ(4, injector->processed_events());
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
} // namespace
diff --git a/base/synchronization/waitable_event_watcher_unittest.cc b/base/synchronization/waitable_event_watcher_unittest.cc
index 8744aa2..03ab800 100644
--- a/base/synchronization/waitable_event_watcher_unittest.cc
+++ b/base/synchronization/waitable_event_watcher_unittest.cc
@@ -26,7 +26,7 @@ const int kNumTestingMessageLoops = arraysize(testing_message_loops);
class QuitDelegate : public WaitableEventWatcher::Delegate {
public:
virtual void OnWaitableEventSignaled(WaitableEvent* event) OVERRIDE {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
};
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index f4ba3ff..8e506ef 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -21,8 +21,8 @@ namespace {
// We use this thread-local variable to record whether or not a thread exited
// because its Stop method was called. This allows us to catch cases where
-// MessageLoop::Quit() is called directly, which is unexpected when using a
-// Thread to setup and run a MessageLoop.
+// MessageLoop::QuitWhenIdle() is called directly, which is unexpected when
+// using a Thread to setup and run a MessageLoop.
base::LazyInstance<base::ThreadLocalBoolean> lazy_tls_bool =
LAZY_INSTANCE_INITIALIZER;
@@ -30,7 +30,7 @@ base::LazyInstance<base::ThreadLocalBoolean> lazy_tls_bool =
// This is used to trigger the message loop to exit.
void ThreadQuitHelper() {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
Thread::SetThreadWasQuitProperly(true);
}
diff --git a/base/timer_unittest.cc b/base/timer_unittest.cc
index 67bd948..6fb89ad 100644
--- a/base/timer_unittest.cc
+++ b/base/timer_unittest.cc
@@ -35,7 +35,7 @@ class OneShotTimerTester {
private:
void Run() {
*did_run_ = true;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
bool* did_run_;
base::OneShotTimer<OneShotTimerTester> timer_;
@@ -56,7 +56,7 @@ class OneShotSelfDeletingTimerTester {
void Run() {
*did_run_ = true;
timer_.reset();
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
bool* did_run_;
scoped_ptr<base::OneShotTimer<OneShotSelfDeletingTimerTester> > timer_;
@@ -76,7 +76,7 @@ class RepeatingTimerTester {
void Run() {
if (--counter_ == 0) {
*did_run_ = true;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
}
bool* did_run_;
@@ -446,12 +446,12 @@ void ClearAllCallbackHappened() {
void SetCallbackHappened1() {
g_callback_happened1 = true;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
void SetCallbackHappened2() {
g_callback_happened2 = true;
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
TEST(TimerTest, ContinuationStopStart) {
diff --git a/base/win/object_watcher_unittest.cc b/base/win/object_watcher_unittest.cc
index e8484b9..dec71cd 100644
--- a/base/win/object_watcher_unittest.cc
+++ b/base/win/object_watcher_unittest.cc
@@ -16,7 +16,7 @@ namespace {
class QuitDelegate : public ObjectWatcher::Delegate {
public:
virtual void OnObjectSignaled(HANDLE object) {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
}
};