diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 03:52:45 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 03:52:45 +0000 |
commit | 21cb28a3306ee9b5103089c961e837ac1cb88a0f (patch) | |
tree | 7d67d76b82f03895eb94d8c788d2a12ab77b0651 /sync/notifier | |
parent | 2485c812faadb63569c571ca6d0d7f8ae7539073 (diff) | |
download | chromium_src-21cb28a3306ee9b5103089c961e837ac1cb88a0f.zip chromium_src-21cb28a3306ee9b5103089c961e837ac1cb88a0f.tar.gz chromium_src-21cb28a3306ee9b5103089c961e837ac1cb88a0f.tar.bz2 |
sync: Use base::MessageLoop.
BUG=236029
R=akalin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14113050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/notifier')
-rw-r--r-- | sync/notifier/ack_tracker_unittest.cc | 2 | ||||
-rw-r--r-- | sync/notifier/invalidation_notifier_unittest.cc | 2 | ||||
-rw-r--r-- | sync/notifier/invalidator_factory_unittest.cc | 2 | ||||
-rw-r--r-- | sync/notifier/non_blocking_invalidator_unittest.cc | 4 | ||||
-rw-r--r-- | sync/notifier/registration_manager_unittest.cc | 2 | ||||
-rw-r--r-- | sync/notifier/sync_invalidation_listener_unittest.cc | 2 | ||||
-rw-r--r-- | sync/notifier/sync_system_resources.cc | 18 | ||||
-rw-r--r-- | sync/notifier/sync_system_resources.h | 2 | ||||
-rw-r--r-- | sync/notifier/sync_system_resources_unittest.cc | 2 |
9 files changed, 18 insertions, 18 deletions
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_; |