diff options
33 files changed, 80 insertions, 82 deletions
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc index 2b2a127..8af8886 100644 --- a/sync/engine/sync_scheduler_impl.cc +++ b/sync/engine/sync_scheduler_impl.cc @@ -211,7 +211,7 @@ void SyncSchedulerImpl::OnServerConnectionErrorFixed() { void SyncSchedulerImpl::Start(Mode mode) { DCHECK(CalledOnValidThread()); - std::string thread_name = MessageLoop::current()->thread_name(); + std::string thread_name = base::MessageLoop::current()->thread_name(); if (thread_name.empty()) thread_name = "<Main thread>"; SDVLOG(2) << "Start called from thread " diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc index ffb2e57..560de05 100644 --- a/sync/engine/sync_scheduler_unittest.cc +++ b/sync/engine/sync_scheduler_unittest.cc @@ -57,26 +57,25 @@ void QuitLoopNow() { // indefinitely in the presence of repeated timers with low delays // and a slow test (e.g., ThrottlingDoesThrottle [which has a poll // delay of 5ms] run under TSAN on the trybots). - MessageLoop::current()->QuitNow(); + base::MessageLoop::current()->QuitNow(); } void RunLoop() { - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } void PumpLoop() { // Do it this way instead of RunAllPending to pump loop exactly once // (necessary in the presence of timers; see comment in // QuitLoopNow). - MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&QuitLoopNow)); + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&QuitLoopNow)); RunLoop(); } void PumpLoopFor(base::TimeDelta time) { // Allow the loop to run for the specified amount of time. - MessageLoop::current()->PostDelayedTask(FROM_HERE, - base::Bind(&QuitLoopNow), - time); + base::MessageLoop::current()->PostDelayedTask( + FROM_HERE, base::Bind(&QuitLoopNow), time); RunLoop(); } @@ -233,7 +232,7 @@ class SyncSchedulerTest : public testing::Test { } base::WeakPtrFactory<SyncSchedulerTest> weak_ptr_factory_; - MessageLoop message_loop_; + base::MessageLoop message_loop_; TestDirectorySetterUpper dir_maker_; scoped_ptr<MockConnectionManager> connection_; scoped_ptr<SyncSessionContext> context_; @@ -253,7 +252,7 @@ void RecordSyncShareImpl(SyncSession* s, SyncShareRecords* record) { ACTION_P(RecordSyncShare, record) { RecordSyncShareImpl(arg0, record); - if (MessageLoop::current()->is_running()) + if (base::MessageLoop::current()->is_running()) QuitLoopNow(); return true; } @@ -262,7 +261,7 @@ ACTION_P2(RecordSyncShareMultiple, record, quit_after) { RecordSyncShareImpl(arg0, record); EXPECT_LE(record->times.size(), quit_after); if (record->times.size() >= quit_after && - MessageLoop::current()->is_running()) { + base::MessageLoop::current()->is_running()) { QuitLoopNow(); } return true; @@ -1197,12 +1196,12 @@ TEST_F(SyncSchedulerTest, StartWhenNotConnected) { scheduler()->ScheduleNudgeAsync( zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(BOOKMARKS), FROM_HERE); // Should save the nudge for until after the server is reachable. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); scheduler()->OnConnectionStatusChange(); connection()->SetServerReachable(); connection()->UpdateConnectionStatus(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } TEST_F(SyncSchedulerTest, ServerConnectionChangeDuringBackoff) { @@ -1230,7 +1229,7 @@ TEST_F(SyncSchedulerTest, ServerConnectionChangeDuringBackoff) { scheduler()->OnConnectionStatusChange(); connection()->SetServerReachable(); connection()->UpdateConnectionStatus(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } // This was supposed to test the scenario where we receive a nudge while a @@ -1265,7 +1264,7 @@ TEST_F(SyncSchedulerTest, ConnectionChangeCanaryPreemptedByNudge) { connection()->UpdateConnectionStatus(); scheduler()->ScheduleNudgeAsync( zero(), NUDGE_SOURCE_LOCAL, 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/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc index 01a8b9d..39025db 100644 --- a/sync/engine/syncer_proto_util_unittest.cc +++ b/sync/engine/syncer_proto_util_unittest.cc @@ -199,7 +199,7 @@ class SyncerProtoUtilTest : public testing::Test { } protected: - MessageLoop message_loop_; + base::MessageLoop message_loop_; TestDirectorySetterUpper dir_maker_; }; diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc index 196f77a..2800f01 100644 --- a/sync/engine/syncer_unittest.cc +++ b/sync/engine/syncer_unittest.cc @@ -537,7 +537,7 @@ class SyncerTest : public testing::Test, return directory()->GetCryptographer(trans); } - MessageLoop message_loop_; + base::MessageLoop message_loop_; // Some ids to aid tests. Only the root one's value is specific. The rest // are named for test clarity. diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc index a063dce..c3cb4b5 100644 --- a/sync/internal_api/http_bridge.cc +++ b/sync/internal_api/http_bridge.cc @@ -140,7 +140,7 @@ HttpBridge::HttpBridge( : context_getter_for_request_(context_getter), network_task_runner_( context_getter_for_request_->GetNetworkTaskRunner()), - created_on_loop_(MessageLoop::current()), + created_on_loop_(base::MessageLoop::current()), http_post_completed_(false, false), network_time_update_callback_(network_time_update_callback) { } @@ -155,7 +155,7 @@ void HttpBridge::SetExtraRequestHeaders(const char * headers) { } void HttpBridge::SetURL(const char* url, int port) { - DCHECK_EQ(MessageLoop::current(), created_on_loop_); + DCHECK_EQ(base::MessageLoop::current(), created_on_loop_); if (DCHECK_IS_ON()) { base::AutoLock lock(fetch_state_lock_); DCHECK(!fetch_state_.request_completed); @@ -173,7 +173,7 @@ void HttpBridge::SetURL(const char* url, int port) { void HttpBridge::SetPostPayload(const char* content_type, int content_length, const char* content) { - DCHECK_EQ(MessageLoop::current(), created_on_loop_); + DCHECK_EQ(base::MessageLoop::current(), created_on_loop_); if (DCHECK_IS_ON()) { base::AutoLock lock(fetch_state_lock_); DCHECK(!fetch_state_.request_completed); @@ -192,7 +192,7 @@ void HttpBridge::SetPostPayload(const char* content_type, } bool HttpBridge::MakeSynchronousPost(int* error_code, int* response_code) { - DCHECK_EQ(MessageLoop::current(), created_on_loop_); + DCHECK_EQ(base::MessageLoop::current(), created_on_loop_); if (DCHECK_IS_ON()) { base::AutoLock lock(fetch_state_lock_); DCHECK(!fetch_state_.request_completed); @@ -237,14 +237,14 @@ void HttpBridge::MakeAsynchronousPost() { } int HttpBridge::GetResponseContentLength() const { - DCHECK_EQ(MessageLoop::current(), created_on_loop_); + DCHECK_EQ(base::MessageLoop::current(), created_on_loop_); base::AutoLock lock(fetch_state_lock_); DCHECK(fetch_state_.request_completed); return fetch_state_.response_content.size(); } const char* HttpBridge::GetResponseContent() const { - DCHECK_EQ(MessageLoop::current(), created_on_loop_); + DCHECK_EQ(base::MessageLoop::current(), created_on_loop_); base::AutoLock lock(fetch_state_lock_); DCHECK(fetch_state_.request_completed); return fetch_state_.response_content.data(); @@ -253,7 +253,7 @@ const char* HttpBridge::GetResponseContent() const { const std::string HttpBridge::GetResponseHeaderValue( const std::string& name) const { - DCHECK_EQ(MessageLoop::current(), created_on_loop_); + DCHECK_EQ(base::MessageLoop::current(), created_on_loop_); base::AutoLock lock(fetch_state_lock_); DCHECK(fetch_state_.request_completed); @@ -313,7 +313,7 @@ void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) { // End of the line for url_poster_. It lives only on the IO loop. // We defer deletion because we're inside a callback from a component of the // URLFetcher, so it seems most natural / "polite" to let the stack unwind. - MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); + base::MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); fetch_state_.url_poster = NULL; // Wake the blocked syncer thread in MakeSynchronousPost. diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc index ad50367..b7dbe99 100644 --- a/sync/internal_api/http_bridge_unittest.cc +++ b/sync/internal_api/http_bridge_unittest.cc @@ -33,7 +33,7 @@ class SyncHttpBridgeTest : public testing::Test { virtual void SetUp() { base::Thread::Options options; - options.message_loop_type = MessageLoop::TYPE_IO; + options.message_loop_type = base::MessageLoop::TYPE_IO; io_thread_.StartWithOptions(options); } @@ -69,7 +69,7 @@ class SyncHttpBridgeTest : public testing::Test { void RunSyncThreadBridgeUseTest(base::WaitableEvent* signal_when_created, base::WaitableEvent* signal_when_released); - static void TestSameHttpNetworkSession(MessageLoop* main_message_loop, + static void TestSameHttpNetworkSession(base::MessageLoop* main_message_loop, SyncHttpBridgeTest* test) { scoped_refptr<HttpBridge> http_bridge(test->BuildBridge()); EXPECT_TRUE(test->GetTestRequestContextGetter()); @@ -80,12 +80,10 @@ class SyncHttpBridgeTest : public testing::Test { http_bridge->GetRequestContextGetterForTest()-> GetURLRequestContext()-> http_transaction_factory()->GetSession()); - main_message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure()); + main_message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); } - MessageLoop* GetIOThreadLoop() { - return io_thread_.message_loop(); - } + base::MessageLoop* GetIOThreadLoop() { return io_thread_.message_loop(); } // Note this is lazy created, so don't call this before your bridge. net::TestURLRequestContextGetter* GetTestRequestContextGetter() { @@ -107,7 +105,7 @@ class SyncHttpBridgeTest : public testing::Test { // Separate thread for IO used by the HttpBridge. base::Thread io_thread_; - MessageLoop loop_; + base::MessageLoop loop_; }; // An HttpBridge that doesn't actually make network requests and just calls @@ -127,7 +125,7 @@ class ShuntedHttpBridge : public HttpBridge { test_(test), never_finishes_(never_finishes) { } protected: virtual void MakeAsynchronousPost() OVERRIDE { - ASSERT_TRUE(MessageLoop::current() == test_->GetIOThreadLoop()); + ASSERT_TRUE(base::MessageLoop::current() == test_->GetIOThreadLoop()); if (never_finishes_) return; @@ -140,7 +138,7 @@ class ShuntedHttpBridge : public HttpBridge { virtual ~ShuntedHttpBridge() {} void CallOnURLFetchComplete() { - ASSERT_TRUE(MessageLoop::current() == test_->GetIOThreadLoop()); + ASSERT_TRUE(base::MessageLoop::current() == test_->GetIOThreadLoop()); // We return no cookies and a dummy content response. net::ResponseCookies cookies; @@ -180,11 +178,12 @@ void SyncHttpBridgeTest::RunSyncThreadBridgeUseTest( TEST_F(SyncHttpBridgeTest, TestUsesSameHttpNetworkSession) { // Run this test on the IO thread because we can only call // URLRequestContextGetter::GetURLRequestContext on the IO thread. - io_thread()->message_loop()->PostTask( - FROM_HERE, - base::Bind(&SyncHttpBridgeTest::TestSameHttpNetworkSession, - MessageLoop::current(), this)); - MessageLoop::current()->Run(); + io_thread()->message_loop() + ->PostTask(FROM_HERE, + base::Bind(&SyncHttpBridgeTest::TestSameHttpNetworkSession, + base::MessageLoop::current(), + this)); + base::MessageLoop::current()->Run(); } // Test the HttpBridge without actually making any network requests. diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc index 943028a..b14cb81 100644 --- a/sync/internal_api/js_mutation_event_observer_unittest.cc +++ b/sync/internal_api/js_mutation_event_observer_unittest.cc @@ -29,7 +29,7 @@ class JsMutationEventObserverTest : public testing::Test { private: // This must be destroyed after the member variables below in order // for WeakHandles to be destroyed properly. - MessageLoop message_loop_; + base::MessageLoop message_loop_; protected: StrictMock<MockJsEventHandler> mock_js_event_handler_; diff --git a/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc b/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc index a7c890e..4b07235 100644 --- a/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc +++ b/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc @@ -34,7 +34,7 @@ class JsSyncEncryptionHandlerObserverTest : public testing::Test { private: // This must be destroyed after the member variables below in order // for WeakHandles to be destroyed properly. - MessageLoop message_loop_; + base::MessageLoop message_loop_; protected: StrictMock<MockJsEventHandler> mock_js_event_handler_; diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc index 0084a4b..40c71be 100644 --- a/sync/internal_api/js_sync_manager_observer_unittest.cc +++ b/sync/internal_api/js_sync_manager_observer_unittest.cc @@ -33,7 +33,7 @@ class JsSyncManagerObserverTest : public testing::Test { private: // This must be destroyed after the member variables below in order // for WeakHandles to be destroyed properly. - MessageLoop message_loop_; + base::MessageLoop message_loop_; protected: StrictMock<MockJsEventHandler> mock_js_event_handler_; diff --git a/sync/internal_api/public/engine/passive_model_worker.cc b/sync/internal_api/public/engine/passive_model_worker.cc index 10d20ee..50d00cf 100644 --- a/sync/internal_api/public/engine/passive_model_worker.cc +++ b/sync/internal_api/public/engine/passive_model_worker.cc @@ -8,7 +8,7 @@ namespace syncer { -PassiveModelWorker::PassiveModelWorker(const MessageLoop* sync_loop) +PassiveModelWorker::PassiveModelWorker(const base::MessageLoop* sync_loop) : sync_loop_(sync_loop) {} PassiveModelWorker::~PassiveModelWorker() { @@ -16,7 +16,7 @@ PassiveModelWorker::~PassiveModelWorker() { SyncerError PassiveModelWorker::DoWorkAndWaitUntilDone( const WorkCallback& work) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // Simply do the work on the current thread. return work.Run(); } diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc index fcfd7bd..56dfe7f 100644 --- a/sync/internal_api/public/util/weak_handle_unittest.cc +++ b/sync/internal_api/public/util/weak_handle_unittest.cc @@ -70,7 +70,7 @@ class WeakHandleTest : public ::testing::Test { h.Call(from_here, &Base::Test); } - MessageLoop message_loop_; + base::MessageLoop message_loop_; }; TEST_F(WeakHandleTest, Uninitialized) { diff --git a/sync/internal_api/sync_encryption_handler_impl.cc b/sync/internal_api/sync_encryption_handler_impl.cc index 71bf4d5..48ad2a8 100644 --- a/sync/internal_api/sync_encryption_handler_impl.cc +++ b/sync/internal_api/sync_encryption_handler_impl.cc @@ -650,7 +650,7 @@ void SyncEncryptionHandlerImpl::ApplyNigoriUpdate( DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(trans); if (!ApplyNigoriUpdateImpl(nigori, trans)) { - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&SyncEncryptionHandlerImpl::RewriteNigori, weak_ptr_factory_.GetWeakPtr())); @@ -739,7 +739,7 @@ bool SyncEncryptionHandlerImpl::SetKeystoreKeys( // Note that triggering migration will have no effect if we're already // properly migrated with the newest keystore keys. if (ShouldTriggerMigration(nigori, *cryptographer)) { - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&SyncEncryptionHandlerImpl::RewriteNigori, weak_ptr_factory_.GetWeakPtr())); diff --git a/sync/internal_api/sync_encryption_handler_impl_unittest.cc b/sync/internal_api/sync_encryption_handler_impl_unittest.cc index 919a65d..5dc9183 100644 --- a/sync/internal_api/sync_encryption_handler_impl_unittest.cc +++ b/sync/internal_api/sync_encryption_handler_impl_unittest.cc @@ -337,7 +337,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test { scoped_ptr<SyncEncryptionHandlerImpl> encryption_handler_; StrictMock<SyncEncryptionHandlerObserverMock> observer_; TestIdFactory ids_; - MessageLoop message_loop_; + base::MessageLoop message_loop_; }; // Verify that the encrypted types are being written to and read from the diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc index 8367725..01b776e 100644 --- a/sync/internal_api/sync_manager_impl_unittest.cc +++ b/sync/internal_api/sync_manager_impl_unittest.cc @@ -231,7 +231,7 @@ class SyncApiTest : public testing::Test { } protected: - MessageLoop message_loop_; + base::MessageLoop message_loop_; TestUserShare test_user_share_; }; @@ -1016,7 +1016,7 @@ class SyncManagerTest : public testing::Test, private: // Needed by |sync_manager_|. - MessageLoop message_loop_; + base::MessageLoop message_loop_; // Needed by |sync_manager_|. base::ScopedTempDir temp_dir_; // Sync Id's for the roots of the enabled datatypes. diff --git a/sync/js/sync_js_controller_unittest.cc b/sync/js/sync_js_controller_unittest.cc index 9a201f2..e2fce2f 100644 --- a/sync/js/sync_js_controller_unittest.cc +++ b/sync/js/sync_js_controller_unittest.cc @@ -27,7 +27,7 @@ class SyncJsControllerTest : public testing::Test { } private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; }; TEST_F(SyncJsControllerTest, Messages) { diff --git a/sync/notifier/ack_tracker_unittest.cc b/sync/notifier/ack_tracker_unittest.cc index 7208d76..8f57f1c 100644 --- a/sync/notifier/ack_tracker_unittest.cc +++ b/sync/notifier/ack_tracker_unittest.cc @@ -109,7 +109,7 @@ class AckTrackerTest : public testing::Test { // AckTracker uses base::Timer internally, which depends on the existence of a // MessageLoop. - MessageLoop message_loop_; + base::MessageLoop message_loop_; }; // Tests that various combinations of Track()/Ack() behave as diff --git a/sync/notifier/invalidation_notifier_unittest.cc b/sync/notifier/invalidation_notifier_unittest.cc index 6bb9276..69d9387 100644 --- a/sync/notifier/invalidation_notifier_unittest.cc +++ b/sync/notifier/invalidation_notifier_unittest.cc @@ -76,7 +76,7 @@ class InvalidationNotifierTestDelegate { } private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; scoped_ptr<InvalidationNotifier> invalidator_; }; diff --git a/sync/notifier/invalidator_factory_unittest.cc b/sync/notifier/invalidator_factory_unittest.cc index 77230ed..31b95fc 100644 --- a/sync/notifier/invalidator_factory_unittest.cc +++ b/sync/notifier/invalidator_factory_unittest.cc @@ -37,7 +37,7 @@ class InvalidatorFactoryTest : public testing::Test { EXPECT_EQ(0, fake_handler_.GetInvalidationCount()); } - MessageLoop message_loop_; + base::MessageLoop message_loop_; FakeInvalidationHandler fake_handler_; notifier::NotifierOptions notifier_options_; scoped_ptr<InvalidatorFactory> factory_; diff --git a/sync/notifier/non_blocking_invalidator_unittest.cc b/sync/notifier/non_blocking_invalidator_unittest.cc index a143aca..bb18c50 100644 --- a/sync/notifier/non_blocking_invalidator_unittest.cc +++ b/sync/notifier/non_blocking_invalidator_unittest.cc @@ -39,7 +39,7 @@ class NonBlockingInvalidatorTestDelegate { invalidation_state_tracker) { DCHECK(!invalidator_.get()); base::Thread::Options options; - options.message_loop_type = MessageLoop::TYPE_IO; + options.message_loop_type = base::MessageLoop::TYPE_IO; io_thread_.StartWithOptions(options); request_context_getter_ = new net::TestURLRequestContextGetter(io_thread_.message_loop_proxy()); @@ -86,7 +86,7 @@ class NonBlockingInvalidatorTestDelegate { } private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; base::Thread io_thread_; scoped_refptr<net::URLRequestContextGetter> request_context_getter_; scoped_ptr<NonBlockingInvalidator> invalidator_; diff --git a/sync/notifier/registration_manager_unittest.cc b/sync/notifier/registration_manager_unittest.cc index edca2ad..5078ddc 100644 --- a/sync/notifier/registration_manager_unittest.cc +++ b/sync/notifier/registration_manager_unittest.cc @@ -227,7 +227,7 @@ class RegistrationManagerTest : public testing::Test { private: // Needed by timers in RegistrationManager. - MessageLoop message_loop_; + base::MessageLoop message_loop_; DISALLOW_COPY_AND_ASSIGN(RegistrationManagerTest); }; diff --git a/sync/notifier/sync_invalidation_listener_unittest.cc b/sync/notifier/sync_invalidation_listener_unittest.cc index dba4728..ad56ab9 100644 --- a/sync/notifier/sync_invalidation_listener_unittest.cc +++ b/sync/notifier/sync_invalidation_listener_unittest.cc @@ -405,7 +405,7 @@ class SyncInvalidationListenerTest : public testing::Test { ObjectIdSet registered_ids_; private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; FakeInvalidationStateTracker fake_tracker_; notifier::FakePushClient* const fake_push_client_; diff --git a/sync/notifier/sync_system_resources.cc b/sync/notifier/sync_system_resources.cc index 386bffe..57e04fa 100644 --- a/sync/notifier/sync_system_resources.cc +++ b/sync/notifier/sync_system_resources.cc @@ -62,19 +62,19 @@ void SyncLogger::SetSystemResources(invalidation::SystemResources* resources) { SyncInvalidationScheduler::SyncInvalidationScheduler() : weak_factory_(this), - created_on_loop_(MessageLoop::current()), + created_on_loop_(base::MessageLoop::current()), is_started_(false), is_stopped_(false) { CHECK(created_on_loop_); } SyncInvalidationScheduler::~SyncInvalidationScheduler() { - CHECK_EQ(created_on_loop_, MessageLoop::current()); + CHECK_EQ(created_on_loop_, base::MessageLoop::current()); CHECK(is_stopped_); } void SyncInvalidationScheduler::Start() { - CHECK_EQ(created_on_loop_, MessageLoop::current()); + CHECK_EQ(created_on_loop_, base::MessageLoop::current()); CHECK(!is_started_); is_started_ = true; is_stopped_ = false; @@ -82,7 +82,7 @@ void SyncInvalidationScheduler::Start() { } void SyncInvalidationScheduler::Stop() { - CHECK_EQ(created_on_loop_, MessageLoop::current()); + CHECK_EQ(created_on_loop_, base::MessageLoop::current()); is_stopped_ = true; is_started_ = false; weak_factory_.InvalidateWeakPtrs(); @@ -93,7 +93,7 @@ void SyncInvalidationScheduler::Stop() { void SyncInvalidationScheduler::Schedule(invalidation::TimeDelta delay, invalidation::Closure* task) { DCHECK(invalidation::IsCallbackRepeatable(task)); - CHECK_EQ(created_on_loop_, MessageLoop::current()); + CHECK_EQ(created_on_loop_, base::MessageLoop::current()); if (!is_started_) { delete task; @@ -101,18 +101,18 @@ void SyncInvalidationScheduler::Schedule(invalidation::TimeDelta delay, } posted_tasks_.insert(task); - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&SyncInvalidationScheduler::RunPostedTask, weak_factory_.GetWeakPtr(), task), delay); } bool SyncInvalidationScheduler::IsRunningOnThread() const { - return created_on_loop_ == MessageLoop::current(); + return created_on_loop_ == base::MessageLoop::current(); } invalidation::Time SyncInvalidationScheduler::GetCurrentTime() const { - CHECK_EQ(created_on_loop_, MessageLoop::current()); + CHECK_EQ(created_on_loop_, base::MessageLoop::current()); return base::Time::Now(); } @@ -122,7 +122,7 @@ void SyncInvalidationScheduler::SetSystemResources( } void SyncInvalidationScheduler::RunPostedTask(invalidation::Closure* task) { - CHECK_EQ(created_on_loop_, MessageLoop::current()); + CHECK_EQ(created_on_loop_, base::MessageLoop::current()); task->Run(); posted_tasks_.erase(task); delete task; diff --git a/sync/notifier/sync_system_resources.h b/sync/notifier/sync_system_resources.h index 9b660bf..eaa0758 100644 --- a/sync/notifier/sync_system_resources.h +++ b/sync/notifier/sync_system_resources.h @@ -69,7 +69,7 @@ class SyncInvalidationScheduler : public invalidation::Scheduler { // Holds all posted tasks that have not yet been run. std::set<invalidation::Closure*> posted_tasks_; - const MessageLoop* created_on_loop_; + const base::MessageLoop* created_on_loop_; bool is_started_; bool is_stopped_; diff --git a/sync/notifier/sync_system_resources_unittest.cc b/sync/notifier/sync_system_resources_unittest.cc index cb406da..8fb62e0 100644 --- a/sync/notifier/sync_system_resources_unittest.cc +++ b/sync/notifier/sync_system_resources_unittest.cc @@ -83,7 +83,7 @@ class SyncSystemResourcesTest : public testing::Test { } // Needed by |sync_system_resources_|. - MessageLoop message_loop_; + base::MessageLoop message_loop_; MockStateWriter mock_state_writer_; SyncSystemResources sync_system_resources_; diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc index 118e64b..229d841 100644 --- a/sync/sessions/sync_session_unittest.cc +++ b/sync/sessions/sync_session_unittest.cc @@ -130,7 +130,7 @@ class SyncSessionTest : public testing::Test, return ModelTypeSet(AUTOFILL); } - MessageLoop message_loop_; + base::MessageLoop message_loop_; bool controller_invocations_allowed_; scoped_ptr<SyncSession> session_; scoped_ptr<SyncSessionContext> context_; diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index e5562aa..ec8512b 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -97,7 +97,7 @@ class SyncableGeneralTest : public testing::Test { virtual void TearDown() { } protected: - MessageLoop message_loop_; + base::MessageLoop message_loop_; base::ScopedTempDir temp_dir_; NullDirectoryChangeDelegate delegate_; FakeEncryptor encryptor_; @@ -446,7 +446,7 @@ TEST_F(SyncableGeneralTest, BookmarkTagTest) { // the unit tests fast. class SyncableDirectoryTest : public testing::Test { protected: - MessageLoop message_loop_; + base::MessageLoop message_loop_; static const char kName[]; virtual void SetUp() { @@ -2103,7 +2103,7 @@ class SyncableDirectoryManagement : public testing::Test { virtual void TearDown() { } protected: - MessageLoop message_loop_; + base::MessageLoop message_loop_; base::ScopedTempDir temp_dir_; FakeEncryptor encryptor_; TestUnrecoverableErrorHandler handler_; @@ -2172,7 +2172,7 @@ class StressTransactionsDelegate : public base::PlatformThread::Delegate { }; TEST(SyncableDirectory, StressTransactions) { - MessageLoop message_loop; + base::MessageLoop message_loop; base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FakeEncryptor encryptor; diff --git a/sync/test/engine/fake_sync_scheduler.cc b/sync/test/engine/fake_sync_scheduler.cc index 826119b..2d34060 100644 --- a/sync/test/engine/fake_sync_scheduler.cc +++ b/sync/test/engine/fake_sync_scheduler.cc @@ -7,7 +7,7 @@ namespace syncer { FakeSyncScheduler::FakeSyncScheduler() - : created_on_loop_(MessageLoop::current()) {} + : created_on_loop_(base::MessageLoop::current()) {} FakeSyncScheduler::~FakeSyncScheduler() {} diff --git a/sync/test/engine/fake_sync_scheduler.h b/sync/test/engine/fake_sync_scheduler.h index 9638ea6..1b9f266e 100644 --- a/sync/test/engine/fake_sync_scheduler.h +++ b/sync/test/engine/fake_sync_scheduler.h @@ -53,7 +53,7 @@ class FakeSyncScheduler : public SyncScheduler { const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; private: - MessageLoop* const created_on_loop_; + base::MessageLoop* const created_on_loop_; }; } // namespace syncer diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h index fa51d82..3033463 100644 --- a/sync/test/engine/syncer_command_test.h +++ b/sync/test/engine/syncer_command_test.h @@ -194,7 +194,7 @@ class SyncerCommandTestBase : public testing::Test, } private: - MessageLoop message_loop_; + base::MessageLoop message_loop_; scoped_ptr<sessions::SyncSessionContext> context_; scoped_ptr<MockConnectionManager> mock_server_; scoped_ptr<sessions::SyncSession> session_; diff --git a/sync/tools/sync_client.cc b/sync/tools/sync_client.cc index 43b63f5..7623db1e 100644 --- a/sync/tools/sync_client.cc +++ b/sync/tools/sync_client.cc @@ -237,10 +237,10 @@ int SyncClientMain(int argc, char* argv[]) { logging::DELETE_OLD_LOG_FILE, logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); - MessageLoop sync_loop; + base::MessageLoop sync_loop; base::Thread io_thread("IO thread"); base::Thread::Options options; - options.message_loop_type = MessageLoop::TYPE_IO; + options.message_loop_type = base::MessageLoop::TYPE_IO; io_thread.StartWithOptions(options); // Parse command line. diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc index 7a0624a..92fde0e 100644 --- a/sync/tools/sync_listen_notifications.cc +++ b/sync/tools/sync_listen_notifications.cc @@ -157,10 +157,10 @@ int SyncListenNotificationsMain(int argc, char* argv[]) { logging::DELETE_OLD_LOG_FILE, logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); - MessageLoop ui_loop; + base::MessageLoop ui_loop; base::Thread io_thread("IO thread"); base::Thread::Options options; - options.message_loop_type = MessageLoop::TYPE_IO; + options.message_loop_type = base::MessageLoop::TYPE_IO; io_thread.StartWithOptions(options); // Parse command line. diff --git a/sync/tools/testserver/run_sync_testserver.cc b/sync/tools/testserver/run_sync_testserver.cc index 00910fc..a13443f 100644 --- a/sync/tools/testserver/run_sync_testserver.cc +++ b/sync/tools/testserver/run_sync_testserver.cc @@ -70,7 +70,7 @@ static bool GetPortFromSwitch(const std::string& switch_name, uint16* port) { int main(int argc, const char* argv[]) { base::AtExitManager at_exit_manager; - MessageLoopForIO message_loop; + base::MessageLoopForIO message_loop; // Process command line CommandLine::Init(argc, argv); diff --git a/sync/util/get_session_name_unittest.cc b/sync/util/get_session_name_unittest.cc index 0d0ffe4..4d8a9c9 100644 --- a/sync/util/get_session_name_unittest.cc +++ b/sync/util/get_session_name_unittest.cc @@ -26,7 +26,7 @@ class GetSessionNameTest : public ::testing::Test { } protected: - MessageLoop message_loop_; + base::MessageLoop message_loop_; std::string session_name_; }; |