diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 23:11:04 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 23:11:04 +0000 |
commit | 9e7154126cd2e6dc9f7935758d17aea9b8df0dc3 (patch) | |
tree | 2b50814c21f5073b41f36661901b48d73e409be2 | |
parent | e1bcc0207442374ab4d539e6a5623fe4cf1fe8cb (diff) | |
download | chromium_src-9e7154126cd2e6dc9f7935758d17aea9b8df0dc3.zip chromium_src-9e7154126cd2e6dc9f7935758d17aea9b8df0dc3.tar.gz chromium_src-9e7154126cd2e6dc9f7935758d17aea9b8df0dc3.tar.bz2 |
Use base::MessageLoop in more files.
These are either missed in the first pass, or added after the first pass.
TBR=thestig@chromium.org
BUG=236029
Review URL: https://codereview.chromium.org/16092013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203259 0039d316-1c4b-4281-b951-d872f2087c98
62 files changed, 143 insertions, 136 deletions
diff --git a/android_webview/browser/aw_form_database_service_unittest.cc b/android_webview/browser/aw_form_database_service_unittest.cc index e269a62..6f8e410 100644 --- a/android_webview/browser/aw_form_database_service_unittest.cc +++ b/android_webview/browser/aw_form_database_service_unittest.cc @@ -49,7 +49,7 @@ class AwFormDatabaseServiceTest : public Test { // The path to the temporary directory used for the test operations. base::ScopedTempDir temp_dir_; // A message loop for UI thread. - MessageLoop message_loop_; + base::MessageLoop message_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; JNIEnv* env_; diff --git a/android_webview/browser/in_process_renderer/in_process_renderer_client.cc b/android_webview/browser/in_process_renderer/in_process_renderer_client.cc index 631a58c..20392ab 100644 --- a/android_webview/browser/in_process_renderer/in_process_renderer_client.cc +++ b/android_webview/browser/in_process_renderer/in_process_renderer_client.cc @@ -29,8 +29,9 @@ int GetInProcessRendererId() { } -MessageLoop* InProcessRendererClient::OverrideCompositorMessageLoop() const { - MessageLoop* rv = content::BrowserThread::UnsafeGetMessageLoopForThread( +base::MessageLoop* InProcessRendererClient::OverrideCompositorMessageLoop() + const { + base::MessageLoop* rv = content::BrowserThread::UnsafeGetMessageLoopForThread( content::BrowserThread::UI); DCHECK(rv); return rv; diff --git a/android_webview/browser/in_process_renderer/in_process_view_renderer.cc b/android_webview/browser/in_process_renderer/in_process_view_renderer.cc index 0121f11..553835c 100644 --- a/android_webview/browser/in_process_renderer/in_process_view_renderer.cc +++ b/android_webview/browser/in_process_renderer/in_process_view_renderer.cc @@ -574,7 +574,7 @@ void InProcessViewRenderer::Invalidate() { void InProcessViewRenderer::EnsureContinuousInvalidation() { if (continuous_invalidate_ && !continuous_invalidate_task_pending_) { - MessageLoop::current()->PostTask(FROM_HERE, + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&InProcessViewRenderer::Invalidate, weak_factory_.GetWeakPtr())); continuous_invalidate_task_pending_ = true; diff --git a/apps/shell_window_geometry_cache_unittest.cc b/apps/shell_window_geometry_cache_unittest.cc index 255c78c..456c165 100644 --- a/apps/shell_window_geometry_cache_unittest.cc +++ b/apps/shell_window_geometry_cache_unittest.cc @@ -51,7 +51,7 @@ class ShellWindowGeometryCacheTest : public testing::Test { protected: TestingProfile profile_; - MessageLoopForUI ui_message_loop_; + base::MessageLoopForUI ui_message_loop_; content::TestBrowserThread ui_thread_; scoped_ptr<extensions::TestExtensionPrefs> prefs_; scoped_ptr<ShellWindowGeometryCache> cache_; diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index 9c10822..4565ef0 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -464,7 +464,7 @@ void WebNotificationTray::OnMessageCenterTrayChanged() { // consecutively, and calling Update in the middle of those events will show // intermediate unread counts for a moment. should_update_tray_content_ = true; - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&WebNotificationTray::UpdateTrayContent, AsWeakPtr())); } diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index 5015075..91ab017 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc @@ -90,7 +90,7 @@ void AshTestHelper::TearDown() { void AshTestHelper::RunAllPendingInMessageLoop() { #if !defined(OS_MACOSX) - DCHECK(MessageLoopForUI::current() == message_loop_); + DCHECK(base::MessageLoopForUI::current() == message_loop_); base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); run_loop.RunUntilIdle(); #endif diff --git a/base/deferred_sequenced_task_runner_unittest.cc b/base/deferred_sequenced_task_runner_unittest.cc index c033ba8..c20e174 100644 --- a/base/deferred_sequenced_task_runner_unittest.cc +++ b/base/deferred_sequenced_task_runner_unittest.cc @@ -64,7 +64,7 @@ class DeferredSequencedTaskRunnerTest : public testing::Test, new base::DeferredSequencedTaskRunner(loop_.message_loop_proxy())) { } - MessageLoop loop_; + base::MessageLoop loop_; scoped_refptr<base::DeferredSequencedTaskRunner> runner_; mutable base::Lock lock_; std::vector<int> executed_task_ids_; diff --git a/base/hi_res_timer_manager_unittest.cc b/base/hi_res_timer_manager_unittest.cc index 601586d..b523284 100644 --- a/base/hi_res_timer_manager_unittest.cc +++ b/base/hi_res_timer_manager_unittest.cc @@ -13,7 +13,7 @@ #if defined(OS_WIN) // http://crbug.com/114048 TEST(HiResTimerManagerTest, DISABLED_ToggleOnOff) { - MessageLoop loop; + base::MessageLoop loop; scoped_ptr<base::PowerMonitor> power_monitor(new base::PowerMonitor()); HighResolutionTimerManager manager; diff --git a/base/mac/libdispatch_task_runner_unittest.cc b/base/mac/libdispatch_task_runner_unittest.cc index 5ebe8d2..cf0dd0e 100644 --- a/base/mac/libdispatch_task_runner_unittest.cc +++ b/base/mac/libdispatch_task_runner_unittest.cc @@ -22,7 +22,7 @@ class LibDispatchTaskRunnerTest : public testing::Test { void DispatchLastTask() { dispatch_async(task_runner_->GetDispatchQueue(), ^{ (&message_loop_)->PostTask(FROM_HERE, - MessageLoop::QuitWhenIdleClosure()); + base::MessageLoop::QuitWhenIdleClosure()); }); message_loop_.Run(); task_runner_->Shutdown(); @@ -52,7 +52,7 @@ class LibDispatchTaskRunnerTest : public testing::Test { } // The message loop for the test main thread. - MessageLoop message_loop_; + base::MessageLoop message_loop_; // The task runner under test. scoped_refptr<base::mac::LibDispatchTaskRunner> task_runner_; @@ -117,7 +117,7 @@ TEST_F(LibDispatchTaskRunnerTest, PostTaskWithinTask) { TEST_F(LibDispatchTaskRunnerTest, NoMessageLoop) { task_runner_->PostTask(FROM_HERE, base::BindBlock(^{ TaskOrderMarker marker(this, - base::StringPrintf("MessageLoop = %p", MessageLoop::current())); + base::StringPrintf("MessageLoop = %p", base::MessageLoop::current())); })); DispatchLastTask(); @@ -158,7 +158,7 @@ TEST_F(LibDispatchTaskRunnerTest, NonNestable) { task_runner_->PostNonNestableTask(FROM_HERE, base::BindBlock(^{ TaskOrderMarker marker(this, "Second NonNestable"); (&message_loop_)->PostTask(FROM_HERE, - MessageLoop::QuitWhenIdleClosure()); + base::MessageLoop::QuitWhenIdleClosure()); })); })); message_loop_.Run(); @@ -183,7 +183,8 @@ TEST_F(LibDispatchTaskRunnerTest, PostDelayed) { task_runner_->PostDelayedTask(FROM_HERE, base::BindBlock(^{ TaskOrderMarker marker(this, "Timed"); run_time = base::TimeTicks::Now(); - (&message_loop_)->PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure()); + (&message_loop_)->PostTask(FROM_HERE, + base::MessageLoop::QuitWhenIdleClosure()); }), delta); task_runner_->PostTask(FROM_HERE, BoundRecordTaskOrder(this, "Second")); message_loop_.Run(); diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc index ec182d1..93996e6 100644 --- a/base/message_loop_unittest.cc +++ b/base/message_loop_unittest.cc @@ -1420,7 +1420,7 @@ void RunTest_RecursivePosts(MessageLoop::Type message_loop_type, #if defined(OS_WIN) -class DispatcherImpl : public MessageLoopForUI::Dispatcher { +class DispatcherImpl : public base::MessageLoopForUI::Dispatcher { public: DispatcherImpl() : dispatch_count_(0) {} diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc index babe40a..3e26fc6 100644 --- a/base/prefs/pref_service.cc +++ b/base/prefs/pref_service.cc @@ -79,7 +79,7 @@ void PrefService::InitFromStorage(bool async) { read_error_callback_.Run(user_pref_store_->ReadPrefs()); } else { // Guarantee that initialization happens after this function returned. - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&PersistentPrefStore::ReadPrefsAsync, user_pref_store_.get(), diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc index 28696d9..5945e32 100644 --- a/base/threading/thread_unittest.cc +++ b/base/threading/thread_unittest.cc @@ -88,7 +88,8 @@ class CaptureToEventList : public Thread { // Observer that writes a value into |event_list| when a message loop has been // destroyed. -class CapturingDestructionObserver : public MessageLoop::DestructionObserver { +class CapturingDestructionObserver + : public base::MessageLoop::DestructionObserver { public: // |event_list| must remain valid throughout the observer's lifetime. explicit CapturingDestructionObserver(EventList* event_list) @@ -106,8 +107,9 @@ class CapturingDestructionObserver : public MessageLoop::DestructionObserver { }; // Task that adds a destruction observer to the current message loop. -void RegisterDestructionObserver(MessageLoop::DestructionObserver* observer) { - MessageLoop::current()->AddDestructionObserver(observer); +void RegisterDestructionObserver( + base::MessageLoop::DestructionObserver* observer) { + base::MessageLoop::current()->AddDestructionObserver(observer); } } // namespace diff --git a/base/timer_unittest.cc b/base/timer_unittest.cc index 1751a38..9fe21a4 100644 --- a/base/timer_unittest.cc +++ b/base/timer_unittest.cc @@ -12,11 +12,11 @@ using base::TimeDelta; namespace { // The message loops on which each timer should be tested. -const MessageLoop::Type testing_message_loops[] = { - MessageLoop::TYPE_DEFAULT, - MessageLoop::TYPE_IO, +const base::MessageLoop::Type testing_message_loops[] = { + base::MessageLoop::TYPE_DEFAULT, + base::MessageLoop::TYPE_IO, #if !defined(OS_IOS) // iOS does not allow direct running of the UI loop. - MessageLoop::TYPE_UI, + base::MessageLoop::TYPE_UI, #endif }; @@ -35,7 +35,7 @@ class OneShotTimerTester { private: void Run() { *did_run_ = true; - MessageLoop::current()->QuitWhenIdle(); + base::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()->QuitWhenIdle(); + base::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()->QuitWhenIdle(); + base::MessageLoop::current()->QuitWhenIdle(); } } bool* did_run_; @@ -84,26 +84,26 @@ class RepeatingTimerTester { base::RepeatingTimer<RepeatingTimerTester> timer_; }; -void RunTest_OneShotTimer(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_OneShotTimer(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); bool did_run = false; OneShotTimerTester f(&did_run); f.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_TRUE(did_run); } -void RunTest_OneShotTimer_Cancel(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_OneShotTimer_Cancel(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); bool did_run_a = false; OneShotTimerTester* a = new OneShotTimerTester(&did_run_a); // This should run before the timer expires. - MessageLoop::current()->DeleteSoon(FROM_HERE, a); + base::MessageLoop::current()->DeleteSoon(FROM_HERE, a); // Now start the timer. a->Start(); @@ -112,44 +112,45 @@ void RunTest_OneShotTimer_Cancel(MessageLoop::Type message_loop_type) { OneShotTimerTester b(&did_run_b); b.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_FALSE(did_run_a); EXPECT_TRUE(did_run_b); } -void RunTest_OneShotSelfDeletingTimer(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_OneShotSelfDeletingTimer( + base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); bool did_run = false; OneShotSelfDeletingTimerTester f(&did_run); f.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_TRUE(did_run); } -void RunTest_RepeatingTimer(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_RepeatingTimer(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); bool did_run = false; RepeatingTimerTester f(&did_run); f.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_TRUE(did_run); } -void RunTest_RepeatingTimer_Cancel(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_RepeatingTimer_Cancel(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); bool did_run_a = false; RepeatingTimerTester* a = new RepeatingTimerTester(&did_run_a); // This should run before the timer expires. - MessageLoop::current()->DeleteSoon(FROM_HERE, a); + base::MessageLoop::current()->DeleteSoon(FROM_HERE, a); // Now start the timer. a->Start(); @@ -158,7 +159,7 @@ void RunTest_RepeatingTimer_Cancel(MessageLoop::Type message_loop_type) { RepeatingTimerTester b(&did_run_b); b.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_FALSE(did_run_a); EXPECT_TRUE(did_run_b); @@ -181,8 +182,8 @@ class DelayTimerTarget { bool signaled_; }; -void RunTest_DelayTimer_NoCall(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_DelayTimer_NoCall(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); // If Delay is never called, the timer shouldn't go off. DelayTimerTarget target; @@ -192,13 +193,13 @@ void RunTest_DelayTimer_NoCall(MessageLoop::Type message_loop_type) { bool did_run = false; OneShotTimerTester tester(&did_run); tester.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); ASSERT_FALSE(target.signaled()); } -void RunTest_DelayTimer_OneCall(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_DelayTimer_OneCall(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); DelayTimerTarget target; base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, @@ -208,7 +209,7 @@ void RunTest_DelayTimer_OneCall(MessageLoop::Type message_loop_type) { bool did_run = false; OneShotTimerTester tester(&did_run, 100 /* milliseconds */); tester.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); ASSERT_TRUE(target.signaled()); } @@ -230,8 +231,8 @@ struct ResetHelper { DelayTimerTarget *const target_; }; -void RunTest_DelayTimer_Reset(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_DelayTimer_Reset(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); // If Delay is never called, the timer shouldn't go off. DelayTimerTarget target; @@ -250,7 +251,7 @@ void RunTest_DelayTimer_Reset(MessageLoop::Type message_loop_type) { bool did_run = false; OneShotTimerTester tester(&did_run, 300); tester.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); ASSERT_TRUE(target.signaled()); } @@ -263,8 +264,8 @@ class DelayTimerFatalTarget { }; -void RunTest_DelayTimer_Deleted(MessageLoop::Type message_loop_type) { - MessageLoop loop(message_loop_type); +void RunTest_DelayTimer_Deleted(base::MessageLoop::Type message_loop_type) { + base::MessageLoop loop(message_loop_type); DelayTimerFatalTarget target; @@ -355,7 +356,7 @@ TEST(TimerTest, MessageLoopShutdown) { OneShotTimerTester c(&did_run); OneShotTimerTester d(&did_run); { - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); a.Start(); b.Start(); } // MessageLoop destructs by falling out of scope. @@ -369,7 +370,7 @@ void TimerTestCallback() { TEST(TimerTest, NonRepeatIsRunning) { { - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); base::Timer timer(false, false); EXPECT_FALSE(timer.IsRunning()); timer.Start(FROM_HERE, TimeDelta::FromDays(1), @@ -382,7 +383,7 @@ TEST(TimerTest, NonRepeatIsRunning) { { base::Timer timer(true, false); - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); EXPECT_FALSE(timer.IsRunning()); timer.Start(FROM_HERE, TimeDelta::FromDays(1), base::Bind(&TimerTestCallback)); @@ -398,7 +399,7 @@ TEST(TimerTest, NonRepeatIsRunning) { TEST(TimerTest, NonRepeatMessageLoopDeath) { base::Timer timer(false, false); { - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); EXPECT_FALSE(timer.IsRunning()); timer.Start(FROM_HERE, TimeDelta::FromDays(1), base::Bind(&TimerTestCallback)); @@ -409,7 +410,7 @@ TEST(TimerTest, NonRepeatMessageLoopDeath) { } TEST(TimerTest, RetainRepeatIsRunning) { - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); base::Timer timer(FROM_HERE, TimeDelta::FromDays(1), base::Bind(&TimerTestCallback), true); EXPECT_FALSE(timer.IsRunning()); @@ -422,7 +423,7 @@ TEST(TimerTest, RetainRepeatIsRunning) { } TEST(TimerTest, RetainNonRepeatIsRunning) { - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); base::Timer timer(FROM_HERE, TimeDelta::FromDays(1), base::Bind(&TimerTestCallback), false); EXPECT_FALSE(timer.IsRunning()); @@ -446,25 +447,25 @@ void ClearAllCallbackHappened() { void SetCallbackHappened1() { g_callback_happened1 = true; - MessageLoop::current()->QuitWhenIdle(); + base::MessageLoop::current()->QuitWhenIdle(); } void SetCallbackHappened2() { g_callback_happened2 = true; - MessageLoop::current()->QuitWhenIdle(); + base::MessageLoop::current()->QuitWhenIdle(); } TEST(TimerTest, ContinuationStopStart) { { ClearAllCallbackHappened(); - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); base::Timer timer(false, false); timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10), base::Bind(&SetCallbackHappened1)); timer.Stop(); timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(40), base::Bind(&SetCallbackHappened2)); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_FALSE(g_callback_happened1); EXPECT_TRUE(g_callback_happened2); } @@ -473,14 +474,14 @@ TEST(TimerTest, ContinuationStopStart) { TEST(TimerTest, ContinuationReset) { { ClearAllCallbackHappened(); - MessageLoop loop(MessageLoop::TYPE_DEFAULT); + base::MessageLoop loop(base::MessageLoop::TYPE_DEFAULT); base::Timer timer(false, false); timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(10), base::Bind(&SetCallbackHappened1)); timer.Reset(); // Since Reset happened before task ran, the user_task must not be cleared: ASSERT_FALSE(timer.user_task().is_null()); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_TRUE(g_callback_happened1); } } diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc index eae7169..6c5bc9f 100644 --- a/cc/test/fake_output_surface.cc +++ b/cc/test/fake_output_surface.cc @@ -36,7 +36,7 @@ void FakeOutputSurface::SendFrameToParentCompositor( CompositorFrame* frame) { frame->AssignTo(&last_sent_frame_); ++num_sent_frames_; - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&FakeOutputSurface::SendFrameAck, weak_ptr_factory_.GetWeakPtr())); } diff --git a/chrome/browser/devtools/devtools_adb_bridge.cc b/chrome/browser/devtools/devtools_adb_bridge.cc index fa5b881..3ef3e55 100644 --- a/chrome/browser/devtools/devtools_adb_bridge.cc +++ b/chrome/browser/devtools/devtools_adb_bridge.cc @@ -585,7 +585,7 @@ DevToolsAdbBridge::RefCountedAdbThread::RefCountedAdbThread() { } } -MessageLoop* DevToolsAdbBridge::RefCountedAdbThread::message_loop() { +base::MessageLoop* DevToolsAdbBridge::RefCountedAdbThread::message_loop() { return thread_ ? thread_->message_loop() : NULL; } diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 4fc5c21..5f2c495 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -2173,7 +2173,7 @@ IN_PROC_BROWSER_TEST_P(MediaStreamDevicesControllerBrowserTest, &MediaStreamDevicesControllerBrowserTest::FinishAudioTest, this)); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } } @@ -2230,7 +2230,7 @@ IN_PROC_BROWSER_TEST_P(MediaStreamDevicesControllerBrowserTest, &MediaStreamDevicesControllerBrowserTest::FinishVideoTest, this)); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } } diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc index 2e95728..a8dda75 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -106,7 +106,7 @@ PrintJobWorker* PrintJob::DetachWorker(PrintJobWorkerOwner* new_owner) { return NULL; } -MessageLoop* PrintJob::message_loop() { +base::MessageLoop* PrintJob::message_loop() { return ui_message_loop_; } diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc index 07ae0d8..8a2321f 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc @@ -56,7 +56,7 @@ PrintJobWorker* PrinterQuery::DetachWorker(PrintJobWorkerOwner* new_owner) { return worker_.release(); } -MessageLoop* PrinterQuery::message_loop() { +base::MessageLoop* PrinterQuery::message_loop() { return io_message_loop_; } diff --git a/chrome/browser/speech/extension_api/tts_extension_apitest.cc b/chrome/browser/speech/extension_api/tts_extension_apitest.cc index fcf86b1..e6009be 100644 --- a/chrome/browser/speech/extension_api/tts_extension_apitest.cc +++ b/chrome/browser/speech/extension_api/tts_extension_apitest.cc @@ -63,7 +63,7 @@ class MockTtsPlatformImpl : public TtsPlatformImpl { } void SendEndEventOnSavedUtteranceId() { - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind( &MockTtsPlatformImpl::SendEvent, ptr_factory_.GetWeakPtr(), diff --git a/chrome/browser/sync/glue/browser_thread_model_worker.cc b/chrome/browser/sync/glue/browser_thread_model_worker.cc index 3d8cfa1..57e4b9d 100644 --- a/chrome/browser/sync/glue/browser_thread_model_worker.cc +++ b/chrome/browser/sync/glue/browser_thread_model_worker.cc @@ -50,7 +50,7 @@ BrowserThreadModelWorker::~BrowserThreadModelWorker() {} void BrowserThreadModelWorker::RegisterForLoopDestruction() { if (BrowserThread::CurrentlyOn(thread_)) { - MessageLoop::current()->AddDestructionObserver(this); + base::MessageLoop::current()->AddDestructionObserver(this); } else { BrowserThread::PostTask( thread_, FROM_HERE, diff --git a/chrome/browser/sync/glue/generic_change_processor_unittest.cc b/chrome/browser/sync/glue/generic_change_processor_unittest.cc index 6ab8a61..7062c204 100644 --- a/chrome/browser/sync/glue/generic_change_processor_unittest.cc +++ b/chrome/browser/sync/glue/generic_change_processor_unittest.cc @@ -70,7 +70,7 @@ class GenericChangeProcessorTest : public testing::Test { } private: - MessageLoop loop; + base::MessageLoop loop; syncer::SyncMergeResult sync_merge_result_; base::WeakPtrFactory<syncer::SyncMergeResult> merge_result_ptr_factory_; diff --git a/chrome/browser/sync/glue/history_model_worker.cc b/chrome/browser/sync/glue/history_model_worker.cc index 205bb6c..656781a 100644 --- a/chrome/browser/sync/glue/history_model_worker.cc +++ b/chrome/browser/sync/glue/history_model_worker.cc @@ -48,7 +48,7 @@ class AddDBThreadObserverTask : public history::HistoryDBTask { virtual bool RunOnDBThread(history::HistoryBackend* backend, history::HistoryDatabase* db) OVERRIDE { - MessageLoop::current()->AddDestructionObserver(history_worker_.get()); + base::MessageLoop::current()->AddDestructionObserver(history_worker_.get()); return true; } diff --git a/chrome/browser/sync/glue/password_model_worker.cc b/chrome/browser/sync/glue/password_model_worker.cc index 7ee1ea4..ae5ac5c 100644 --- a/chrome/browser/sync/glue/password_model_worker.cc +++ b/chrome/browser/sync/glue/password_model_worker.cc @@ -55,7 +55,7 @@ void PasswordModelWorker::CallDoWorkAndSignalTask( } void PasswordModelWorker::RegisterForPasswordLoopDestruction() { - MessageLoop::current()->AddDestructionObserver(this); + base::MessageLoop::current()->AddDestructionObserver(this); } } // namespace browser_sync diff --git a/chrome/browser/sync/glue/ui_model_worker.cc b/chrome/browser/sync/glue/ui_model_worker.cc index c9de1e8..1105c97 100644 --- a/chrome/browser/sync/glue/ui_model_worker.cc +++ b/chrome/browser/sync/glue/ui_model_worker.cc @@ -79,7 +79,7 @@ void UIModelWorker::Stop() { void UIModelWorker::RegisterForLoopDestruction() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - MessageLoop::current()->AddDestructionObserver(this); + base::MessageLoop::current()->AddDestructionObserver(this); } syncer::SyncerError UIModelWorker::DoWorkAndWaitUntilDoneImpl( diff --git a/chrome/browser/ui/app_list/search/history_data_store_unittest.cc b/chrome/browser/ui/app_list/search/history_data_store_unittest.cc index d1ed8d1..46b7643 100644 --- a/chrome/browser/ui/app_list/search/history_data_store_unittest.cc +++ b/chrome/browser/ui/app_list/search/history_data_store_unittest.cc @@ -91,7 +91,7 @@ class HistoryDataStoreTest : public testing::Test { run_loop_->Quit(); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; base::ScopedTempDir temp_dir_; base::FilePath data_file_; diff --git a/chrome/browser/ui/app_list/search/history_unittest.cc b/chrome/browser/ui/app_list/search/history_unittest.cc index b7892c4..72a3a6c 100644 --- a/chrome/browser/ui/app_list/search/history_unittest.cc +++ b/chrome/browser/ui/app_list/search/history_unittest.cc @@ -158,7 +158,7 @@ class SearchHistoryTest : public testing::Test { } private: - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; scoped_ptr<TestingProfile> profile_; diff --git a/chrome/browser/ui/webui/theme_source.cc b/chrome/browser/ui/webui/theme_source.cc index 0a87c080..ce95355 100644 --- a/chrome/browser/ui/webui/theme_source.cc +++ b/chrome/browser/ui/webui/theme_source.cc @@ -97,7 +97,7 @@ std::string ThemeSource::GetMimeType(const std::string& path) const { return "image/png"; } -MessageLoop* ThemeSource::MessageLoopForRequestPath( +base::MessageLoop* ThemeSource::MessageLoopForRequestPath( const std::string& path) const { std::string uncached_path; webui::ParsePathAndScale(GURL(GetThemePath() + path), &uncached_path, NULL); diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc index 4899ff1..c07cf89 100644 --- a/chrome/test/pyautolib/pyautolib.cc +++ b/chrome/test/pyautolib/pyautolib.cc @@ -55,10 +55,10 @@ PyUITestBase::~PyUITestBase() { } // static, refer .h for why it needs to be static -MessageLoop* PyUITestBase::message_loop_ = NULL; +base::MessageLoop* PyUITestBase::message_loop_ = NULL; // static -MessageLoop* PyUITestBase::GetSharedMessageLoop( +base::MessageLoop* PyUITestBase::GetSharedMessageLoop( base::MessageLoop::Type msg_loop_type) { if (!message_loop_) // Create a shared instance of MessageLoop message_loop_ = new base::MessageLoop(msg_loop_type); diff --git a/components/autofill/browser/personal_data_manager_unittest.cc b/components/autofill/browser/personal_data_manager_unittest.cc index 03089db..4d53ced 100644 --- a/components/autofill/browser/personal_data_manager_unittest.cc +++ b/components/autofill/browser/personal_data_manager_unittest.cc @@ -302,7 +302,7 @@ TEST_F(PersonalDataManagerTest, UpdateUnverifiedProfilesAndCreditCards) { // Verify that the web database has been updated and the notification sent. EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop()); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); const std::vector<AutofillProfile*>& profiles1 = personal_data_->GetProfiles(); @@ -346,7 +346,7 @@ TEST_F(PersonalDataManagerTest, UpdateUnverifiedProfilesAndCreditCards) { // Verify that the web database has been updated and the notification sent. EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop()); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); const std::vector<AutofillProfile*>& profiles3 = personal_data_->GetProfiles(); @@ -1929,7 +1929,7 @@ TEST_F(PersonalDataManagerTest, AggregateExistingVerifiedProfileWithConflict) { // Verify that the web database has been updated and the notification sent. EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop()); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); // Simulate a form submission with conflicting info. FormData form; @@ -1987,7 +1987,7 @@ TEST_F(PersonalDataManagerTest, // Verify that the web database has been updated and the notification sent. EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop()); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); // Simulate a form submission with conflicting expiration year. FormData form; diff --git a/components/webdata/common/web_data_request_manager.cc b/components/webdata/common/web_data_request_manager.cc index c6e15f9..635e1fc 100644 --- a/components/webdata/common/web_data_request_manager.cc +++ b/components/webdata/common/web_data_request_manager.cc @@ -42,7 +42,7 @@ WebDataServiceConsumer* WebDataRequest::GetConsumer() const { return consumer_; } -MessageLoop* WebDataRequest::GetMessageLoop() const { +base::MessageLoop* WebDataRequest::GetMessageLoop() const { return message_loop_; } diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index f04b342..27c791d 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -411,8 +411,8 @@ void BrowserMainLoop::MainMessageLoopStart() { scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter( new base::win::TextServicesMessageFilter); if (tsf_message_filter->Init()) { - MessageLoopForUI::current()->SetMessageFilter( - tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>()); + base::MessageLoopForUI::current()->SetMessageFilter( + tsf_message_filter.PassAs<base::MessageLoopForUI::MessageFilter>()); } } #endif diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc index 37f67bc..07b99a3f 100644 --- a/content/browser/browser_thread_impl.cc +++ b/content/browser/browser_thread_impl.cc @@ -457,7 +457,7 @@ BrowserThread::GetMessageLoopProxyForThread(ID identifier) { } // static -MessageLoop* BrowserThread::UnsafeGetMessageLoopForThread(ID identifier) { +base::MessageLoop* BrowserThread::UnsafeGetMessageLoopForThread(ID identifier) { if (g_globals == NULL) return NULL; diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc index 7cef1f0..a5055b6 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc @@ -66,7 +66,7 @@ bool BrowserGpuChannelHostFactory::IsIOThread() { return BrowserThread::CurrentlyOn(BrowserThread::IO); } -MessageLoop* BrowserGpuChannelHostFactory::GetMainLoop() { +base::MessageLoop* BrowserGpuChannelHostFactory::GetMainLoop() { return BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::UI); } diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc index 0341935..0f887ea9 100644 --- a/content/browser/loader/resource_dispatcher_host_unittest.cc +++ b/content/browser/loader/resource_dispatcher_host_unittest.cc @@ -1409,7 +1409,7 @@ TEST_F(ResourceDispatcherHostTest, TooManyOutstandingRequests) { // Flush all the pending requests. while (net::URLRequestTestJob::ProcessOnePendingMessage()) {} - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Sorts out all the messages we saw by request. ResourceIPCAccumulator::ClassifiedMessages msgs; diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc index abd600b..ceefb98 100644 --- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc +++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc @@ -142,7 +142,7 @@ class MediaStreamDispatcherHostTest : public testing::Test { protected: virtual void SetUp() OVERRIDE { // MediaStreamManager must be created and called on IO thread. - message_loop_.reset(new MessageLoop(base::MessageLoop::TYPE_IO)); + message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); ui_thread_.reset(new TestBrowserThread(BrowserThread::UI, message_loop_.get())); io_thread_.reset(new TestBrowserThread(BrowserThread::IO, diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc index b352c9f..f64a922 100644 --- a/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc +++ b/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc @@ -339,7 +339,7 @@ TEST_F(P2PSocketHostStunTcpTest, SendDataNoAuth) { // Verify that asynchronous writes are handled correctly. TEST_F(P2PSocketHostStunTcpTest, AsyncWrites) { - MessageLoop message_loop; + base::MessageLoop message_loop; socket_->set_async_write(true); diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc index 33bd1ca..4a6de28 100644 --- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc +++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc @@ -170,7 +170,7 @@ class RenderWidgetHostViewBrowserTest : public ContentBrowserTest { // call stack. static void GiveItSomeTime() { base::RunLoop run_loop; - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, run_loop.QuitClosure(), base::TimeDelta::FromMilliseconds(10)); diff --git a/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc b/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc index 96b70a2..3808983 100644 --- a/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc +++ b/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc @@ -123,20 +123,20 @@ class SmoothScrollGestureControllerTest : public testing::Test { #endif // Process all pending tasks to avoid leaks. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } void PostQuitMessageAndRun() { // Allow the message loop to process pending synthetic scrolls, then quit. - MessageLoop::current()->PostDelayedTask( - FROM_HERE, MessageLoop::QuitClosure(), + base::MessageLoop::current()->PostDelayedTask( + FROM_HERE, base::MessageLoop::QuitClosure(), TimeDelta::FromMilliseconds( controller_.GetSyntheticScrollMessageInterval().InMilliseconds() * 3)); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; scoped_ptr<TestBrowserContext> browser_context_; MockRenderProcessHost* process_; // Deleted automatically by the widget. diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc index 449451f..3440b65 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc @@ -160,7 +160,8 @@ bool ContentRendererClient::AllowBrowserPlugin( return false; } -MessageLoop* ContentRendererClient::OverrideCompositorMessageLoop() const { +base::MessageLoop* ContentRendererClient::OverrideCompositorMessageLoop() + const { return NULL; } diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc index c680760..ec75926 100644 --- a/content/public/test/mock_render_thread.cc +++ b/content/public/test/mock_render_thread.cc @@ -56,7 +56,7 @@ bool MockRenderThread::Send(IPC::Message* msg) { return true; } -MessageLoop* MockRenderThread::GetMessageLoop() { +base::MessageLoop* MockRenderThread::GetMessageLoop() { return NULL; } diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 9783efb..d39d64d 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -547,7 +547,7 @@ bool RenderThreadImpl::Send(IPC::Message* msg) { return rv; } -MessageLoop* RenderThreadImpl::GetMessageLoop() { +base::MessageLoop* RenderThreadImpl::GetMessageLoop() { return message_loop(); } @@ -1084,7 +1084,7 @@ bool RenderThreadImpl::IsIOThread() { ChildProcess::current()->io_message_loop(); } -MessageLoop* RenderThreadImpl::GetMainLoop() { +base::MessageLoop* RenderThreadImpl::GetMainLoop() { return message_loop(); } diff --git a/device/bluetooth/bluetooth_profile_chromeos_unittest.cc b/device/bluetooth/bluetooth_profile_chromeos_unittest.cc index a1d623f8..140ba2d 100644 --- a/device/bluetooth/bluetooth_profile_chromeos_unittest.cc +++ b/device/bluetooth/bluetooth_profile_chromeos_unittest.cc @@ -29,7 +29,7 @@ namespace chromeos { class BluetoothProfileChromeOSTest : public testing::Test { public: BluetoothProfileChromeOSTest() - : message_loop_(MessageLoop::TYPE_IO), + : message_loop_(base::MessageLoop::TYPE_IO), callback_count_(0), error_callback_count_(0), profile_callback_count_(0), diff --git a/extensions/common/one_shot_event_unittest.cc b/extensions/common/one_shot_event_unittest.cc index ec2ddfd..4009a01 100644 --- a/extensions/common/one_shot_event_unittest.cc +++ b/extensions/common/one_shot_event_unittest.cc @@ -58,7 +58,7 @@ TEST(OneShotEventTest, PostDefaultsToCurrentMessageLoop) { OneShotEvent event; scoped_refptr<base::TestSimpleTaskRunner> runner( new base::TestSimpleTaskRunner); - MessageLoop loop; + base::MessageLoop loop; int runner_i = 0; int loop_i = 0; diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc index 7ca6c70..a1c5bab 100644 --- a/media/base/android/media_source_player.cc +++ b/media/base/android/media_source_player.cc @@ -117,7 +117,7 @@ void MediaDecoderJob::DecodeInternal( start_wallclock_time + start_presentation_timestamp); } if (time_to_render >= base::TimeDelta()) { - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&MediaDecoderJob::ReleaseOutputBuffer, weak_this_.GetWeakPtr(), outputBufferIndex, size, diff --git a/net/proxy/proxy_resolver_v8_tracing.cc b/net/proxy/proxy_resolver_v8_tracing.cc index 63e94d9..65fe482 100644 --- a/net/proxy/proxy_resolver_v8_tracing.cc +++ b/net/proxy/proxy_resolver_v8_tracing.cc @@ -471,7 +471,7 @@ ProxyResolverV8* ProxyResolverV8Tracing::Job::v8_resolver() { return parent_->v8_resolver_.get(); } -MessageLoop* ProxyResolverV8Tracing::Job::worker_loop() { +base::MessageLoop* ProxyResolverV8Tracing::Job::worker_loop() { return parent_->thread_->message_loop(); } diff --git a/remoting/host/setup/start_host.cc b/remoting/host/setup/start_host.cc index 7f7abe7..185e9af 100644 --- a/remoting/host/setup/start_host.cc +++ b/remoting/host/setup/start_host.cc @@ -27,7 +27,7 @@ using remoting::HostStarter; bool g_started = false; // The main message loop. -MessageLoop* g_message_loop = NULL; +base::MessageLoop* g_message_loop = NULL; // Lets us hide the PIN that a user types. void SetEcho(bool echo) { diff --git a/remoting/host/token_validator_factory_impl_unittest.cc b/remoting/host/token_validator_factory_impl_unittest.cc index 5e4dbef..efff36c 100644 --- a/remoting/host/token_validator_factory_impl_unittest.cc +++ b/remoting/host/token_validator_factory_impl_unittest.cc @@ -81,7 +81,7 @@ class TokenValidatorFactoryImplTest : public testing::Test { return response; } - MessageLoop message_loop_; + base::MessageLoop message_loop_; scoped_refptr<RsaKeyPair> key_pair_; scoped_refptr<net::URLRequestContextGetter> request_context_getter_; scoped_ptr<TokenValidatorFactoryImpl> token_validator_factory_; diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc index 3820102..75f5418 100644 --- a/sync/engine/sync_scheduler_unittest.cc +++ b/sync/engine/sync_scheduler_unittest.cc @@ -1293,7 +1293,7 @@ TEST_F(SyncSchedulerTest, ConnectionChangeCanaryPreemptedByNudge) { connection()->SetServerReachable(); connection()->UpdateConnectionStatus(); scheduler()->ScheduleLocalNudge(zero(), ModelTypeSet(BOOKMARKS), FROM_HERE); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } // Tests that we don't crash trying to run two canaries at once if we receive diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h index 94925df..aedf649 100644 --- a/sync/internal_api/public/engine/model_safe_worker.h +++ b/sync/internal_api/public/engine/model_safe_worker.h @@ -66,7 +66,7 @@ class WorkerLoopDestructionObserver { // work and will notify its observer. class SYNC_EXPORT ModelSafeWorker : public base::RefCountedThreadSafe<ModelSafeWorker>, - public MessageLoop::DestructionObserver { + public base::MessageLoop::DestructionObserver { public: // Subclass should implement to observe destruction of the loop where // it actually does work. diff --git a/sync/test/accounts_client/test_accounts_client.cc b/sync/test/accounts_client/test_accounts_client.cc index 82e7af2..8257691 100644 --- a/sync/test/accounts_client/test_accounts_client.cc +++ b/sync/test/accounts_client/test_accounts_client.cc @@ -135,7 +135,7 @@ GURL TestAccountsClient::CreateGURLWithPath(const string& path) { bool TestAccountsClient::SendRequest(const GURL& url, string* response) { - MessageLoop* loop = MessageLoop::current(); + base::MessageLoop* loop = base::MessageLoop::current(); scoped_refptr<URLRequestContextGetter> context_getter( new URLRequestContextGetter(loop->message_loop_proxy())); @@ -148,7 +148,7 @@ bool TestAccountsClient::SendRequest(const GURL& url, string* response) { fetcher->SetUploadData("application/json", ""); fetcher->Start(); - MessageLoop::current()->PostDelayedTask(FROM_HERE, + base::MessageLoop::current()->PostDelayedTask(FROM_HERE, run_loop.QuitClosure(), kRequestTimeout); run_loop.Run(); diff --git a/sync/test/accounts_client/test_accounts_client.h b/sync/test/accounts_client/test_accounts_client.h index cade734..5c98642 100644 --- a/sync/test/accounts_client/test_accounts_client.h +++ b/sync/test/accounts_client/test_accounts_client.h @@ -54,7 +54,7 @@ class TestAccountsClient { private: GURL CreateGURLWithPath(const string& path); - MessageLoopForIO io_loop_; + base::MessageLoopForIO io_loop_; const string server_; const string account_space_; vector<string> usernames_; diff --git a/ui/aura/dispatcher_win.cc b/ui/aura/dispatcher_win.cc index 7b2777d..2b4ca8a 100644 --- a/ui/aura/dispatcher_win.cc +++ b/ui/aura/dispatcher_win.cc @@ -26,7 +26,7 @@ bool DispatcherWin::Dispatch(const base::NativeEvent& msg) { return true; } -MessageLoop::Dispatcher* CreateDispatcher() { +base::MessageLoop::Dispatcher* CreateDispatcher() { return new DispatcherWin; } diff --git a/ui/aura/env.cc b/ui/aura/env.cc index 33a6b01..9d1bac5 100644 --- a/ui/aura/env.cc +++ b/ui/aura/env.cc @@ -64,7 +64,7 @@ void Env::RemoveObserver(EnvObserver* observer) { } #if !defined(OS_MACOSX) -MessageLoop::Dispatcher* Env::GetDispatcher() { +base::MessageLoop::Dispatcher* Env::GetDispatcher() { #if defined(USE_X11) return base::MessagePumpAuraX11::Current(); #else diff --git a/ui/aura/env.h b/ui/aura/env.h index 99b0577..4ad55b6 100644 --- a/ui/aura/env.h +++ b/ui/aura/env.h @@ -24,7 +24,7 @@ class Window; #if !defined(USE_X11) // Creates a platform-specific native event dispatcher. -MessageLoop::Dispatcher* CreateDispatcher(); +base::MessageLoop::Dispatcher* CreateDispatcher(); #endif // A singleton object that tracks general state within Aura. diff --git a/ui/base/win/singleton_hwnd.cc b/ui/base/win/singleton_hwnd.cc index a4af8ab..aad849e 100644 --- a/ui/base/win/singleton_hwnd.cc +++ b/ui/base/win/singleton_hwnd.cc @@ -17,8 +17,8 @@ SingletonHwnd* SingletonHwnd::GetInstance() { void SingletonHwnd::AddObserver(Observer* observer) { if (!hwnd()) { - if (!MessageLoop::current() || - MessageLoop::current()->type() != MessageLoop::TYPE_UI) { + if (!base::MessageLoop::current() || + base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) { // Creating this window in (e.g.) a renderer inhibits shutdown on // Windows. See http://crbug.com/230122 and http://crbug.com/236039. DLOG(ERROR) << "Cannot create windows on non-UI thread!"; diff --git a/ui/snapshot/snapshot_aura_unittest.cc b/ui/snapshot/snapshot_aura_unittest.cc index 8f93c16..206069b 100644 --- a/ui/snapshot/snapshot_aura_unittest.cc +++ b/ui/snapshot/snapshot_aura_unittest.cc @@ -66,7 +66,8 @@ class SnapshotAuraTest : public testing::Test { virtual void SetUp() OVERRIDE { testing::Test::SetUp(); - helper_.reset(new aura::test::AuraTestHelper(MessageLoopForUI::current())); + helper_.reset( + new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); helper_->SetUp(); } diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc index bb19b7d..298f125 100644 --- a/ui/surface/accelerated_surface_win.cc +++ b/ui/surface/accelerated_surface_win.cc @@ -174,7 +174,7 @@ PresentThread::PresentThread(const char* name, uint64 adapter_luid) void PresentThread::SetAdapterLUID(uint64 adapter_luid) { base::AutoLock locked(lock_); - CHECK(message_loop() == MessageLoop::current()); + CHECK(message_loop() == base::MessageLoop::current()); if (adapter_luid_ == adapter_luid) return; diff --git a/webkit/browser/blob/blob_storage_context_unittest.cc b/webkit/browser/blob/blob_storage_context_unittest.cc index e462b95..ef24bdc 100644 --- a/webkit/browser/blob/blob_storage_context_unittest.cc +++ b/webkit/browser/blob/blob_storage_context_unittest.cc @@ -28,7 +28,7 @@ void SetupBasicBlob(BlobStorageHost* host, const std::string& id) { TEST(BlobStorageContextTest, IncrementDecrementRef) { BlobStorageContext context; BlobStorageHost host(&context); - MessageLoop fake_io_message_loop; + base::MessageLoop fake_io_message_loop; // Build up a basic blob. const std::string kId("id"); @@ -58,7 +58,7 @@ TEST(BlobStorageContextTest, IncrementDecrementRef) { TEST(BlobStorageContextTest, BlobDataHandle) { BlobStorageContext context; BlobStorageHost host(&context); - MessageLoop fake_io_message_loop; + base::MessageLoop fake_io_message_loop; // Build up a basic blob. const std::string kId("id"); @@ -89,7 +89,7 @@ TEST(BlobStorageContextTest, CompoundBlobs) { const std::string kId2("id2"); const std::string kId2Prime("id2.prime"); - MessageLoop fake_io_message_loop; + base::MessageLoop fake_io_message_loop; // Setup a set of blob data for testing. base::Time time1, time2; @@ -134,7 +134,7 @@ TEST(BlobStorageContextTest, CompoundBlobs) { TEST(BlobStorageContextTest, PublicBlobUrls) { BlobStorageContext context; BlobStorageHost host(&context); - MessageLoop fake_io_message_loop; + base::MessageLoop fake_io_message_loop; // Build up a basic blob. const std::string kId("id"); @@ -166,7 +166,7 @@ TEST(BlobStorageContextTest, PublicBlobUrls) { TEST(BlobStorageContextTest, HostCleanup) { BlobStorageContext context; scoped_ptr<BlobStorageHost> host(new BlobStorageHost(&context)); - MessageLoop fake_io_message_loop; + base::MessageLoop fake_io_message_loop; // Build up a basic blob and register a url const std::string kId("id"); @@ -185,7 +185,7 @@ TEST(BlobStorageContextTest, HostCleanup) { TEST(BlobStorageContextTest, EarlyContextDeletion) { scoped_ptr<BlobStorageContext> context(new BlobStorageContext); BlobStorageHost host(context.get()); - MessageLoop fake_io_message_loop; + base::MessageLoop fake_io_message_loop; // Deleting the context should not induce crashes. context.reset(); diff --git a/webkit/browser/fileapi/transient_file_util_unittest.cc b/webkit/browser/fileapi/transient_file_util_unittest.cc index 69d2c0a..58a8046 100644 --- a/webkit/browser/fileapi/transient_file_util_unittest.cc +++ b/webkit/browser/fileapi/transient_file_util_unittest.cc @@ -34,7 +34,7 @@ class TransientFileUtilTest : public testing::Test { virtual void TearDown() OVERRIDE { file_system_context_ = NULL; - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } void CreateAndRegisterTemporaryFile( @@ -65,7 +65,7 @@ class TransientFileUtilTest : public testing::Test { FileSystemFileUtil* file_util() { return transient_file_util_.get(); } private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; base::ScopedTempDir data_dir_; scoped_refptr<FileSystemContext> file_system_context_; scoped_ptr<TransientFileUtil> transient_file_util_; @@ -110,7 +110,7 @@ TEST_F(TransientFileUtilTest, TransientFile) { } // The file's now scoped out. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Now the temporary file and the transient filesystem must be gone too. ASSERT_FALSE(file_util::PathExists(temp_path)); diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc index 75cbd72..94310dc 100644 --- a/webkit/tools/test_shell/simple_file_system.cc +++ b/webkit/tools/test_shell/simple_file_system.cc @@ -51,7 +51,7 @@ using fileapi::FileSystemTaskRunners; using fileapi::FileSystemURL; namespace { -MessageLoop* g_io_thread; +base::MessageLoop* g_io_thread; webkit_blob::BlobStorageController* g_blob_storage_controller; void RegisterBlob(const GURL& blob_url, const base::FilePath& file_path) { diff --git a/webkit/tools/test_shell/simple_socket_stream_bridge.cc b/webkit/tools/test_shell/simple_socket_stream_bridge.cc index 85bdc06..50723f0 100644 --- a/webkit/tools/test_shell/simple_socket_stream_bridge.cc +++ b/webkit/tools/test_shell/simple_socket_stream_bridge.cc @@ -25,7 +25,7 @@ const int kNoSocketId = 0; namespace { -MessageLoop* g_io_thread; +base::MessageLoop* g_io_thread; net::URLRequestContext* g_request_context; class WebSocketStreamHandleBridgeImpl @@ -231,7 +231,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnClose() { void WebSocketStreamHandleBridgeImpl::DoOnError( int error_code, const char* error_msg) { - DCHECK(MessageLoop::current() == message_loop_); + DCHECK(base::MessageLoop::current() == message_loop_); base::subtle::NoBarrier_AtomicIncrement(&num_pending_tasks_, -1); if (delegate_) delegate_->DidFail(handle_, error_code, ASCIIToUTF16(error_msg)); diff --git a/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc b/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc index 3374dac..6352656 100644 --- a/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc +++ b/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc @@ -19,7 +19,7 @@ using webkit_blob::BlobData; namespace { -MessageLoop* g_io_thread; +base::MessageLoop* g_io_thread; webkit_blob::BlobStorageController* g_blob_storage_controller; // Creates a new BlobData from WebBlobData. |