diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 22:08:16 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 22:08:16 +0000 |
commit | b3a25098c4a6895e1acd139146d618094dbd4df8 (patch) | |
tree | a344a722e481f117b63e701ba26108339dd7296f /chrome/browser/sync | |
parent | 3d8ab9f85ac4bd6e49213ab5bfbd1e620e24d261 (diff) | |
download | chromium_src-b3a25098c4a6895e1acd139146d618094dbd4df8.zip chromium_src-b3a25098c4a6895e1acd139146d618094dbd4df8.tar.gz chromium_src-b3a25098c4a6895e1acd139146d618094dbd4df8.tar.bz2 |
chrome: Use base::MessageLoop. (Part 3)
This CL updates chrome/browser/* other than chrome/browser/ui which is in
another CL.
BUG=236029
TBR=brettw
Review URL: https://chromiumcodereview.appspot.com/14113053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
52 files changed, 160 insertions, 160 deletions
diff --git a/chrome/browser/sync/about_sync_util_unittest.cc b/chrome/browser/sync/about_sync_util_unittest.cc index 02ca59b..342a1f2 100644 --- a/chrome/browser/sync/about_sync_util_unittest.cc +++ b/chrome/browser/sync/about_sync_util_unittest.cc @@ -19,7 +19,7 @@ namespace sync_ui_util { namespace { TEST(SyncUIUtilTest, ConstructAboutInformationWithUnrecoverableErrorTest) { - MessageLoopForUI message_loop; + base::MessageLoopForUI message_loop; content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); scoped_ptr<Profile> profile( ProfileSyncServiceMock::MakeSignedInTestingProfile()); diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.h b/chrome/browser/sync/abstract_profile_sync_service_test.h index 491e084..bf01250 100644 --- a/chrome/browser/sync/abstract_profile_sync_service_test.h +++ b/chrome/browser/sync/abstract_profile_sync_service_test.h @@ -52,7 +52,7 @@ class AbstractProfileSyncServiceTest : public testing::Test { content::BrowserContext* profile); protected: - MessageLoopForUI ui_loop_; + base::MessageLoopForUI ui_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; content::TestBrowserThread file_thread_; diff --git a/chrome/browser/sync/backend_migrator.cc b/chrome/browser/sync/backend_migrator.cc index 2c0472a..5a0967f 100644 --- a/chrome/browser/sync/backend_migrator.cc +++ b/chrome/browser/sync/backend_migrator.cc @@ -115,7 +115,7 @@ void BackendMigrator::OnConfigureDone( // |manager_|'s methods aren't re-entrant, and we're notified from // them, so post a task to avoid problems. SDVLOG(1) << "Posting OnConfigureDoneImpl"; - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&BackendMigrator::OnConfigureDoneImpl, weak_ptr_factory_.GetWeakPtr(), result)); diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc index eea2589..9605154 100644 --- a/chrome/browser/sync/backend_migrator_unittest.cc +++ b/chrome/browser/sync/backend_migrator_unittest.cc @@ -101,7 +101,7 @@ class SyncBackendMigratorTest : public testing::Test { private: scoped_ptr<SyncSessionSnapshot> snap_; - MessageLoop message_loop_; + base::MessageLoop message_loop_; syncer::ModelTypeSet preferred_types_; NiceMock<ProfileSyncServiceMock> service_; NiceMock<DataTypeManagerMock> manager_; diff --git a/chrome/browser/sync/glue/android_invalidator_bridge_proxy_unittest.cc b/chrome/browser/sync/glue/android_invalidator_bridge_proxy_unittest.cc index 5fc8ec2..d3b9011 100644 --- a/chrome/browser/sync/glue/android_invalidator_bridge_proxy_unittest.cc +++ b/chrome/browser/sync/glue/android_invalidator_bridge_proxy_unittest.cc @@ -58,7 +58,7 @@ class AndroidInvalidatorBridgeProxyTest : public testing::Test { ui_loop_.RunUntilIdle(); } - MessageLoop ui_loop_; + base::MessageLoop ui_loop_; content::TestBrowserThread ui_thread_; ::testing::NiceMock<ProfileMock> mock_profile_; AndroidInvalidatorBridge bridge_; diff --git a/chrome/browser/sync/glue/android_invalidator_bridge_unittest.cc b/chrome/browser/sync/glue/android_invalidator_bridge_unittest.cc index b1c1fc3..8298c2a 100644 --- a/chrome/browser/sync/glue/android_invalidator_bridge_unittest.cc +++ b/chrome/browser/sync/glue/android_invalidator_bridge_unittest.cc @@ -149,7 +149,7 @@ class AndroidInvalidatorBridgeTest : public testing::Test { run_loop.Run(); } - MessageLoop ui_loop_; + base::MessageLoop ui_loop_; content::TestBrowserThread ui_thread_; base::Thread sync_thread_; NiceMock<ProfileMock> mock_profile_; diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc index 6183101..d5b827e 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc @@ -220,7 +220,7 @@ class SyncAutofillDataTypeControllerTest : public testing::Test { protected: base::WeakPtrFactory<SyncAutofillDataTypeControllerTest> weak_ptr_factory_; - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc index 8504801..2703dbc0 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc @@ -144,7 +144,7 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test { base::Unretained(&start_callback_))); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; scoped_refptr<BookmarkDataTypeController> bookmark_dtc_; scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_; diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc index fe443fe..febc8b4 100644 --- a/chrome/browser/sync/glue/bookmark_model_associator.cc +++ b/chrome/browser/sync/glue/bookmark_model_associator.cc @@ -645,7 +645,7 @@ void BookmarkModelAssociator::PostPersistAssociationsTask() { // No need to post a task if a task is already pending. if (weak_factory_.HasWeakPtrs()) return; - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind( &BookmarkModelAssociator::PersistAssociations, diff --git a/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc b/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc index 895302db..e2174d1 100644 --- a/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc +++ b/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc @@ -58,7 +58,7 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test { EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); timer_.Stop(); // Stop the failure timer so the test succeeds. BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, MessageLoop::QuitClosure()); + BrowserThread::IO, FROM_HERE, base::MessageLoop::QuitClosure()); did_do_work_ = true; return syncer::SYNCER_OK; } @@ -68,7 +68,7 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test { void Timeout() { ADD_FAILURE() << "Timed out waiting for work to be done on the DB thread."; BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, MessageLoop::QuitClosure()); + BrowserThread::IO, FROM_HERE, base::MessageLoop::QuitClosure()); } protected: @@ -88,17 +88,17 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test { OneShotTimer<SyncBrowserThreadModelWorkerTest> timer_; content::TestBrowserThread db_thread_; - MessageLoopForIO io_loop_; + base::MessageLoopForIO io_loop_; content::TestBrowserThread io_thread_; base::WeakPtrFactory<SyncBrowserThreadModelWorkerTest> weak_factory_; }; TEST_F(SyncBrowserThreadModelWorkerTest, DoesWorkOnDatabaseThread) { - MessageLoop::current()->PostTask(FROM_HERE, + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&SyncBrowserThreadModelWorkerTest::ScheduleWork, factory()->GetWeakPtr())); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_TRUE(did_do_work()); } diff --git a/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc b/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc index 27b3e91..799ff7d 100644 --- a/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc +++ b/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc @@ -70,7 +70,7 @@ class SyncChromeExtensionsActivityMonitorTest : public testing::Test { virtual ~SyncChromeExtensionsActivityMonitorTest() {} private: - MessageLoop ui_loop_; + base::MessageLoop ui_loop_; content::TestBrowserThread ui_thread_; protected: diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc index a487866..5675c01 100644 --- a/chrome/browser/sync/glue/data_type_manager_impl.cc +++ b/chrome/browser/sync/glue/data_type_manager_impl.cc @@ -167,7 +167,7 @@ bool DataTypeManagerImpl::ProcessReconfigure() { // Unwind the stack before executing configure. The method configure and its // callees are not re-entrant. - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&DataTypeManagerImpl::ConfigureImpl, weak_ptr_factory_.GetWeakPtr(), diff --git a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc index 44b80cb..7477b08 100644 --- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc +++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc @@ -144,7 +144,7 @@ class SyncDataTypeManagerImplTest : public testing::Test { static_cast<FakeDataTypeController*>(it->second.get())); } - MessageLoopForUI ui_loop_; + base::MessageLoopForUI ui_loop_; content::TestBrowserThread ui_thread_; DataTypeController::TypeMap controllers_; FakeBackendDataTypeConfigurer configurer_; diff --git a/chrome/browser/sync/glue/favicon_cache.cc b/chrome/browser/sync/glue/favicon_cache.cc index c94528e..3193791 100644 --- a/chrome/browser/sync/glue/favicon_cache.cc +++ b/chrome/browser/sync/glue/favicon_cache.cc @@ -538,7 +538,7 @@ void FaviconCache::OnReceivedSyncFavicon(const GURL& page_url, // Post a task to do the actual association because this method may have been // called while in a transaction. - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&FaviconCache::OnReceivedSyncFaviconImpl, weak_ptr_factory_.GetWeakPtr(), diff --git a/chrome/browser/sync/glue/favicon_cache_unittest.cc b/chrome/browser/sync/glue/favicon_cache_unittest.cc index ad3a91a..bf1d26c 100644 --- a/chrome/browser/sync/glue/favicon_cache_unittest.cc +++ b/chrome/browser/sync/glue/favicon_cache_unittest.cc @@ -295,7 +295,7 @@ class SyncFaviconCacheTest : public testing::Test { int64 last_visit_time_ms); private: - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; FaviconCache cache_; // Our dummy ChangeProcessor used to inspect changes pushed to Sync. diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc index f78d5e4..981e848 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc @@ -151,7 +151,7 @@ class SyncFrontendDataTypeControllerTest : public testing::Test { message_loop_.RunUntilIdle(); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; scoped_refptr<FrontendDataTypeControllerFake> frontend_dtc_; scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_; diff --git a/chrome/browser/sync/glue/model_association_manager_unittest.cc b/chrome/browser/sync/glue/model_association_manager_unittest.cc index 8d38176..4f5a43f 100644 --- a/chrome/browser/sync/glue/model_association_manager_unittest.cc +++ b/chrome/browser/sync/glue/model_association_manager_unittest.cc @@ -60,7 +60,7 @@ class SyncModelAssociationManagerTest : public testing::Test { } protected: - MessageLoopForUI ui_loop_; + base::MessageLoopForUI ui_loop_; content::TestBrowserThread ui_thread_; MockModelAssociationResultProcessor result_processor_; DataTypeController::TypeMap controllers_; diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc index f9a8d50..91cd8bb 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc @@ -190,7 +190,7 @@ class SyncNonFrontendDataTypeControllerTest : public testing::Test { if (!done.IsSignaled()) { ADD_FAILURE() << "Timed out waiting for DB thread to finish."; } - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } void Start() { @@ -202,7 +202,7 @@ class SyncNonFrontendDataTypeControllerTest : public testing::Test { base::Unretained(&start_callback_))); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; scoped_refptr<NonFrontendDataTypeControllerFake> non_frontend_dtc_; diff --git a/chrome/browser/sync/glue/non_ui_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_ui_data_type_controller_unittest.cc index fa68314..4be7a1b 100644 --- a/chrome/browser/sync/glue/non_ui_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/non_ui_data_type_controller_unittest.cc @@ -184,7 +184,7 @@ class SyncNonUIDataTypeControllerTest : public testing::Test { if (!done.IsSignaled()) { ADD_FAILURE() << "Timed out waiting for DB thread to finish."; } - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } protected: @@ -241,7 +241,7 @@ class SyncNonUIDataTypeControllerTest : public testing::Test { done->Signal(); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; ProfileMock profile_; diff --git a/chrome/browser/sync/glue/password_change_processor.cc b/chrome/browser/sync/glue/password_change_processor.cc index 2ebe5c1..23c7452 100644 --- a/chrome/browser/sync/glue/password_change_processor.cc +++ b/chrome/browser/sync/glue/password_change_processor.cc @@ -36,7 +36,7 @@ PasswordChangeProcessor::PasswordChangeProcessor( : ChangeProcessor(error_handler), model_associator_(model_associator), password_store_(password_store), - expected_loop_(MessageLoop::current()) { + expected_loop_(base::MessageLoop::current()) { DCHECK(model_associator); DCHECK(error_handler); #if defined(OS_MACOSX) @@ -47,14 +47,14 @@ PasswordChangeProcessor::PasswordChangeProcessor( } PasswordChangeProcessor::~PasswordChangeProcessor() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); } void PasswordChangeProcessor::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); DCHECK(chrome::NOTIFICATION_LOGINS_CHANGED == type); syncer::WriteTransaction trans(FROM_HERE, share_handle()); @@ -162,7 +162,7 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel( const syncer::BaseTransaction* trans, int64 model_version, const syncer::ImmutableChangeRecordList& changes) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); syncer::ReadNode password_root(trans); if (password_root.InitByTagLookup(kPasswordTag) != @@ -220,7 +220,7 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel( } void PasswordChangeProcessor::CommitChangesFromSyncModel() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); ScopedStopObserving<PasswordChangeProcessor> stop_observing(this); syncer::SyncError error = model_associator_->WriteToPasswordStore( @@ -239,19 +239,19 @@ void PasswordChangeProcessor::CommitChangesFromSyncModel() { } void PasswordChangeProcessor::StartImpl(Profile* profile) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); StartObserving(); } void PasswordChangeProcessor::StartObserving() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); notification_registrar_.Add(this, chrome::NOTIFICATION_LOGINS_CHANGED, content::Source<PasswordStore>(password_store_)); } void PasswordChangeProcessor::StopObserving() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); notification_registrar_.Remove( this, chrome::NOTIFICATION_LOGINS_CHANGED, diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc index 33e0e2f..99bc3ec 100644 --- a/chrome/browser/sync/glue/password_model_associator.cc +++ b/chrome/browser/sync/glue/password_model_associator.cc @@ -34,7 +34,7 @@ PasswordModelAssociator::PasswordModelAssociator( password_store_(password_store), password_node_id_(syncer::kInvalidId), abort_association_pending_(false), - expected_loop_(MessageLoop::current()), + expected_loop_(base::MessageLoop::current()), error_handler_(error_handler) { DCHECK(sync_service_); #if defined(OS_MACOSX) @@ -50,7 +50,7 @@ syncer::SyncError PasswordModelAssociator::AssociateModels( syncer::SyncMergeResult* local_merge_result, syncer::SyncMergeResult* syncer_merge_result) { syncer::SyncError error; - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); { base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = false; @@ -181,7 +181,7 @@ syncer::SyncError PasswordModelAssociator::AssociateModels( bool PasswordModelAssociator::DeleteAllNodes( syncer::WriteTransaction* trans) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); for (PasswordToSyncIdMap::iterator node_id = id_map_.begin(); node_id != id_map_.end(); ++node_id) { syncer::WriteNode sync_node(trans); @@ -266,7 +266,7 @@ int64 PasswordModelAssociator::GetSyncIdFromChromeId( void PasswordModelAssociator::Associate( const std::string* password, int64 sync_id) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); DCHECK_NE(syncer::kInvalidId, sync_id); DCHECK(id_map_.find(*password) == id_map_.end()); DCHECK(id_map_inverse_.find(sync_id) == id_map_inverse_.end()); @@ -275,7 +275,7 @@ void PasswordModelAssociator::Associate( } void PasswordModelAssociator::Disassociate(int64 sync_id) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); SyncIdToPasswordMap::iterator iter = id_map_inverse_.find(sync_id); if (iter == id_map_inverse_.end()) return; diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc index 2bed2ae..e65c4bd 100644 --- a/chrome/browser/sync/glue/session_model_associator.cc +++ b/chrome/browser/sync/glue/session_model_associator.cc @@ -1120,10 +1120,10 @@ bool SessionModelAssociator::ShouldSyncTab(const SyncedTabDelegate& tab) const { void SessionModelAssociator::QuitLoopForSubtleTesting() { if (waiting_for_change_) { - DVLOG(1) << "Quitting MessageLoop for test."; + DVLOG(1) << "Quitting base::MessageLoop for test."; waiting_for_change_ = false; test_weak_factory_.InvalidateWeakPtrs(); - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } } @@ -1136,7 +1136,7 @@ void SessionModelAssociator::BlockUntilLocalChangeForTest( if (test_weak_factory_.HasWeakPtrs()) return; waiting_for_change_ = true; - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&SessionModelAssociator::QuitLoopForSubtleTesting, test_weak_factory_.GetWeakPtr()), diff --git a/chrome/browser/sync/glue/session_model_associator_unittest.cc b/chrome/browser/sync/glue/session_model_associator_unittest.cc index c272480..12ccd3c 100644 --- a/chrome/browser/sync/glue/session_model_associator_unittest.cc +++ b/chrome/browser/sync/glue/session_model_associator_unittest.cc @@ -79,7 +79,7 @@ class SyncSessionModelAssociatorTest : public testing::Test { } private: - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; NiceMock<ProfileMock> profile_; NiceMock<ProfileSyncServiceMock> sync_service_; diff --git a/chrome/browser/sync/glue/shared_change_processor_unittest.cc b/chrome/browser/sync/glue/shared_change_processor_unittest.cc index 755990c..795d738 100644 --- a/chrome/browser/sync/glue/shared_change_processor_unittest.cc +++ b/chrome/browser/sync/glue/shared_change_processor_unittest.cc @@ -112,7 +112,7 @@ class SyncSharedChangeProcessorTest : public testing::Test { base::WeakPtr<syncer::SyncMergeResult>())); } - MessageLoopForUI ui_loop_; + base::MessageLoopForUI ui_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index 8820876..15e7967 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -272,7 +272,7 @@ class SyncBackendHost::Core // The loop where all the sync backend operations happen. // Non-NULL only between calls to DoInitialize() and DoShutdown(). - MessageLoop* sync_loop_; + base::MessageLoop* sync_loop_; // Our parent's registrar (not owned). Non-NULL only between // calls to DoInitialize() and DoShutdown(). @@ -353,7 +353,7 @@ SyncBackendHost::SyncBackendHost( const base::WeakPtr<invalidation::InvalidatorStorage>& invalidator_storage) : weak_ptr_factory_(this), sync_thread_("Chrome_SyncThread"), - frontend_loop_(MessageLoop::current()), + frontend_loop_(base::MessageLoop::current()), profile_(profile), name_(name), core_(new Core(name, profile_->GetPath().Append(kSyncDataFolderName), @@ -372,7 +372,7 @@ SyncBackendHost::SyncBackendHost( SyncBackendHost::SyncBackendHost(Profile* profile) : weak_ptr_factory_(this), sync_thread_("Chrome_SyncThread"), - frontend_loop_(MessageLoop::current()), + frontend_loop_(base::MessageLoop::current()), profile_(profile), name_("Unknown"), initialization_state_(NOT_ATTEMPTED), @@ -478,7 +478,7 @@ void SyncBackendHost::UpdateCredentials(const SyncCredentials& credentials) { void SyncBackendHost::UpdateRegisteredInvalidationIds( const syncer::ObjectIdSet& ids) { - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); DCHECK(sync_thread_.IsRunning()); sync_thread_.message_loop()->PostTask(FROM_HERE, base::Bind(&SyncBackendHost::Core::DoUpdateRegisteredInvalidationIds, @@ -487,7 +487,7 @@ void SyncBackendHost::UpdateRegisteredInvalidationIds( void SyncBackendHost::AcknowledgeInvalidation( const invalidation::ObjectId& id, const syncer::AckHandle& ack_handle) { - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); DCHECK(sync_thread_.IsRunning()); sync_thread_.message_loop()->PostTask(FROM_HERE, base::Bind(&SyncBackendHost::Core::DoAcknowledgeInvalidation, @@ -518,7 +518,7 @@ void SyncBackendHost::SetEncryptionPassphrase(const std::string& passphrase, DCHECK(!passphrase.empty()); // This should only be called by the frontend. - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); // SetEncryptionPassphrase should never be called if we are currently // encrypted with an explicit passphrase. @@ -542,7 +542,7 @@ bool SyncBackendHost::SetDecryptionPassphrase(const std::string& passphrase) { DCHECK(!passphrase.empty()); // This should only be called by the frontend. - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); // This should only be called when we have cached pending keys. DCHECK(cached_pending_keys_.has_blob()); @@ -591,7 +591,7 @@ void SyncBackendHost::StopSyncManagerForShutdown( } void SyncBackendHost::StopSyncingForShutdown() { - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); // Immediately stop sending messages to the frontend. frontend_ = NULL; @@ -848,7 +848,7 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop( syncer::ModelTypeSet)>& ready_task) { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); if (!ready_task.is_null()) ready_task.Run(succeeded_configuration_types, failed_configuration_types); } @@ -906,7 +906,7 @@ void SyncBackendHost::Observe( } SyncBackendHost::DoInitializeOptions::DoInitializeOptions( - MessageLoop* sync_loop, + base::MessageLoop* sync_loop, SyncBackendRegistrar* registrar, const syncer::ModelSafeRoutingInfo& routing_info, const std::vector<syncer::ModelSafeWorker*>& workers, @@ -970,7 +970,7 @@ void SyncBackendHost::Core::OnSyncCycleCompleted( const SyncSessionSnapshot& snapshot) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, @@ -1000,7 +1000,7 @@ void SyncBackendHost::Core::DoDownloadControlTypes( } void SyncBackendHost::Core::DoRefreshTypes(syncer::ModelTypeSet types) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->RefreshTypes(types); } @@ -1015,7 +1015,7 @@ void SyncBackendHost::Core::OnInitializationComplete( debug_info_listener, bool success, const syncer::ModelTypeSet restored_types) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); if (!success) { DoDestroySyncManager(); @@ -1047,7 +1047,7 @@ void SyncBackendHost::Core::OnConnectionStatusChange( syncer::ConnectionStatus status) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, &SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop, status); @@ -1058,7 +1058,7 @@ void SyncBackendHost::Core::OnPassphraseRequired( const sync_pb::EncryptedData& pending_keys) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, &SyncBackendHost::NotifyPassphraseRequired, reason, pending_keys); @@ -1067,7 +1067,7 @@ void SyncBackendHost::Core::OnPassphraseRequired( void SyncBackendHost::Core::OnPassphraseAccepted() { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, &SyncBackendHost::NotifyPassphraseAccepted); @@ -1078,7 +1078,7 @@ void SyncBackendHost::Core::OnBootstrapTokenUpdated( syncer::BootstrapTokenType type) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call(FROM_HERE, &SyncBackendHost::PersistEncryptionBootstrapToken, bootstrap_token, @@ -1088,7 +1088,7 @@ void SyncBackendHost::Core::OnBootstrapTokenUpdated( void SyncBackendHost::Core::OnStopSyncingPermanently() { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, &SyncBackendHost::HandleStopSyncingPermanentlyOnFrontendLoop); @@ -1097,7 +1097,7 @@ void SyncBackendHost::Core::OnStopSyncingPermanently() { void SyncBackendHost::Core::OnUpdatedToken(const std::string& token) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, &SyncBackendHost::NotifyUpdatedToken, token); @@ -1108,7 +1108,7 @@ void SyncBackendHost::Core::OnEncryptedTypesChanged( bool encrypt_everything) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // NOTE: We're in a transaction. host_.Call( FROM_HERE, @@ -1119,7 +1119,7 @@ void SyncBackendHost::Core::OnEncryptedTypesChanged( void SyncBackendHost::Core::OnEncryptionComplete() { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // NOTE: We're in a transaction. host_.Call( FROM_HERE, @@ -1143,7 +1143,7 @@ void SyncBackendHost::Core::OnActionableError( const syncer::SyncProtocolError& sync_error) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call( FROM_HERE, &SyncBackendHost::HandleActionableErrorEventOnFrontendLoop, @@ -1154,7 +1154,7 @@ void SyncBackendHost::Core::OnInvalidatorStateChange( syncer::InvalidatorState state) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call(FROM_HERE, &SyncBackendHost::HandleInvalidatorStateChangeOnFrontendLoop, state); @@ -1164,7 +1164,7 @@ void SyncBackendHost::Core::OnIncomingInvalidation( const syncer::ObjectIdInvalidationMap& invalidation_map) { if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call(FROM_HERE, &SyncBackendHost::HandleIncomingInvalidationOnFrontendLoop, invalidation_map); @@ -1244,7 +1244,7 @@ void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) { void SyncBackendHost::Core::DoUpdateCredentials( const SyncCredentials& credentials) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // UpdateCredentials can be called during backend initialization, possibly // when backend initialization has failed but hasn't notified the UI thread // yet. In that case, the sync manager may have been destroyed on the sync @@ -1256,7 +1256,7 @@ void SyncBackendHost::Core::DoUpdateCredentials( void SyncBackendHost::Core::DoUpdateRegisteredInvalidationIds( const syncer::ObjectIdSet& ids) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // |sync_manager_| may end up being NULL here in tests (in // synchronous initialization mode) since this is called during // shutdown. @@ -1269,7 +1269,7 @@ void SyncBackendHost::Core::DoUpdateRegisteredInvalidationIds( void SyncBackendHost::Core::DoAcknowledgeInvalidation( const invalidation::ObjectId& id, const syncer::AckHandle& ack_handle) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // |sync_manager_| may end up being NULL here in tests (in // synchronous initialization mode). // @@ -1281,20 +1281,20 @@ void SyncBackendHost::Core::DoAcknowledgeInvalidation( void SyncBackendHost::Core::DoStartSyncing( const syncer::ModelSafeRoutingInfo& routing_info) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->StartSyncingNormally(routing_info); } void SyncBackendHost::Core::DoSetEncryptionPassphrase( const std::string& passphrase, bool is_explicit) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->GetEncryptionHandler()->SetEncryptionPassphrase( passphrase, is_explicit); } void SyncBackendHost::Core::DoInitialProcessControlTypes() { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); DVLOG(1) << "Initilalizing Control Types"; @@ -1347,13 +1347,13 @@ void SyncBackendHost::Core::DoFinishInitialProcessControlTypes() { void SyncBackendHost::Core::DoSetDecryptionPassphrase( const std::string& passphrase) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase( passphrase); } void SyncBackendHost::Core::DoEnableEncryptEverything() { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->GetEncryptionHandler()->EnableEncryptEverything(); } @@ -1367,7 +1367,7 @@ void SyncBackendHost::Core::DoStopSyncManagerForShutdown( } void SyncBackendHost::Core::DoShutdown(bool sync_disabled) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // It's safe to do this even if the type was never activated. registrar_->DeactivateDataType(syncer::DEVICE_INFO); synced_device_tracker_.reset(); @@ -1385,7 +1385,7 @@ void SyncBackendHost::Core::DoShutdown(bool sync_disabled) { } void SyncBackendHost::Core::DoDestroySyncManager() { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); if (sync_manager_) { save_changes_timer_.reset(); if (registered_as_invalidation_handler_) { @@ -1406,7 +1406,7 @@ void SyncBackendHost::Core::DoConfigureSyncer( const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& ready_task, const base::Closure& retry_callback) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->ConfigureSyncer( reason, types_to_config, @@ -1425,7 +1425,7 @@ void SyncBackendHost::Core::DoFinishConfigureDataTypes( syncer::ModelTypeSet types_to_config, const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& ready_task) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); // Update the enabled types for the bridge and sync manager. syncer::ModelSafeRoutingInfo routing_info; @@ -1446,14 +1446,14 @@ void SyncBackendHost::Core::DoFinishConfigureDataTypes( void SyncBackendHost::Core::DoRetryConfiguration( const base::Closure& retry_callback) { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); host_.Call(FROM_HERE, &SyncBackendHost::RetryConfigurationOnFrontendLoop, retry_callback); } void SyncBackendHost::Core::DeleteSyncDataFolder() { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); if (file_util::DirectoryExists(sync_data_folder_path_)) { if (!file_util::Delete(sync_data_folder_path_, true)) SLOG(DFATAL) << "Could not delete the Sync Data folder."; @@ -1464,7 +1464,7 @@ void SyncBackendHost::Core::StartSavingChanges() { // We may already be shut down. if (!sync_loop_) return; - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); DCHECK(!save_changes_timer_.get()); save_changes_timer_.reset(new base::RepeatingTimer<Core>()); save_changes_timer_->Start(FROM_HERE, @@ -1473,7 +1473,7 @@ void SyncBackendHost::Core::StartSavingChanges() { } void SyncBackendHost::Core::SaveChanges() { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); sync_manager_->SaveChanges(); } @@ -1485,7 +1485,7 @@ void SyncBackendHost::AddExperimentalTypes() { } void SyncBackendHost::HandleControlTypesDownloadRetry() { - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); if (!frontend_) return; @@ -1498,7 +1498,7 @@ void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop( if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); if (!success) { js_backend_.Reset(); initialization_state_ = NOT_INITIALIZED; @@ -1525,7 +1525,7 @@ void SyncBackendHost::HandleSyncCycleCompletedOnFrontendLoop( const SyncSessionSnapshot& snapshot) { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); last_snapshot_ = snapshot; @@ -1566,7 +1566,7 @@ void SyncBackendHost::HandleActionableErrorEventOnFrontendLoop( const syncer::SyncProtocolError& sync_error) { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); frontend_->OnActionableError(sync_error); } @@ -1574,7 +1574,7 @@ void SyncBackendHost::HandleInvalidatorStateChangeOnFrontendLoop( syncer::InvalidatorState state) { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); frontend_->OnInvalidatorStateChange(state); } @@ -1582,7 +1582,7 @@ void SyncBackendHost::HandleIncomingInvalidationOnFrontendLoop( const syncer::ObjectIdInvalidationMap& invalidation_map) { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); frontend_->OnIncomingInvalidation(invalidation_map); } @@ -1604,7 +1604,7 @@ void SyncBackendHost::NotifyPassphraseRequired( if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); // Update our cache of the cryptographer's pending keys. cached_pending_keys_ = pending_keys; @@ -1616,7 +1616,7 @@ void SyncBackendHost::NotifyPassphraseAccepted() { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); // Clear our cache of the cryptographer's pending keys. cached_pending_keys_.clear_blob(); @@ -1638,7 +1638,7 @@ void SyncBackendHost::NotifyEncryptedTypesChanged( if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); frontend_->OnEncryptedTypesChanged( encrypted_types, encrypt_everything); } @@ -1647,14 +1647,14 @@ void SyncBackendHost::NotifyEncryptionComplete() { if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); frontend_->OnEncryptionComplete(); } void SyncBackendHost::HandlePassphraseTypeChangedOnFrontendLoop( syncer::PassphraseType type, base::Time explicit_passphrase_time) { - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); DVLOG(1) << "Passphrase type changed to " << syncer::PassphraseTypeToString(type); cached_passphrase_type_ = type; @@ -1672,7 +1672,7 @@ void SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop( if (!frontend_) return; - DCHECK_EQ(MessageLoop::current(), frontend_loop_); + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); DVLOG(1) << "Connection status changed: " << syncer::ConnectionStatusToString(status); diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc index 1379825..4474035 100644 --- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc @@ -53,7 +53,7 @@ ACTION_P(Signal, event) { } void QuitMessageLoop() { - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } class MockSyncFrontend : public SyncFrontend { @@ -249,14 +249,14 @@ class SyncBackendHostTest : public testing::Test { protected: void DownloadReady(syncer::ModelTypeSet succeeded_types, syncer::ModelTypeSet failed_types) { - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } void OnDownloadRetry() { NOTIMPLEMENTED(); } - MessageLoop ui_loop_; + base::MessageLoop ui_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread io_thread_; StrictMock<MockSyncFrontend> mock_frontend_; diff --git a/chrome/browser/sync/glue/sync_backend_registrar.cc b/chrome/browser/sync/glue/sync_backend_registrar.cc index 47ee4a4..cebd473 100644 --- a/chrome/browser/sync/glue/sync_backend_registrar.cc +++ b/chrome/browser/sync/glue/sync_backend_registrar.cc @@ -55,7 +55,7 @@ bool IsOnThreadForGroup(syncer::ModelType type, syncer::ModelSafeGroup group) { SyncBackendRegistrar::SyncBackendRegistrar( const std::string& name, Profile* profile, - MessageLoop* sync_loop) : + base::MessageLoop* sync_loop) : name_(name), profile_(profile), sync_loop_(sync_loop), @@ -175,7 +175,7 @@ void SyncBackendRegistrar::StopOnUIThread() { } void SyncBackendRegistrar::OnSyncerShutdownComplete() { - DCHECK_EQ(MessageLoop::current(), sync_loop_); + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); ui_worker_->OnSyncerShutdownComplete(); } diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc index a628f77..3761067 100644 --- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc @@ -65,7 +65,7 @@ class SyncBackendRegistrarTest : public testing::Test { } } - MessageLoop loop_; + base::MessageLoop loop_; syncer::TestUserShare test_user_share_; private: diff --git a/chrome/browser/sync/glue/synced_device_tracker_unittest.cc b/chrome/browser/sync/glue/synced_device_tracker_unittest.cc index ee89fd7..2af2780 100644 --- a/chrome/browser/sync/glue/synced_device_tracker_unittest.cc +++ b/chrome/browser/sync/glue/synced_device_tracker_unittest.cc @@ -70,7 +70,7 @@ class SyncedDeviceTrackerTest : public ::testing::Test { return test_user_share_.transaction_observer()->transactions_observed(); } - MessageLoop message_loop_; + base::MessageLoop message_loop_; syncer::TestUserShare test_user_share_; int transaction_count_baseline_; }; diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc index 6281bbb..5ac4df5 100644 --- a/chrome/browser/sync/glue/typed_url_change_processor.cc +++ b/chrome/browser/sync/glue/typed_url_change_processor.cc @@ -43,7 +43,7 @@ TypedUrlChangeProcessor::TypedUrlChangeProcessor( profile_(profile), model_associator_(model_associator), history_backend_(history_backend), - expected_loop_(MessageLoop::current()) { + expected_loop_(base::MessageLoop::current()) { DCHECK(model_associator); DCHECK(history_backend); DCHECK(error_handler); @@ -55,14 +55,14 @@ TypedUrlChangeProcessor::TypedUrlChangeProcessor( } TypedUrlChangeProcessor::~TypedUrlChangeProcessor() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); } void TypedUrlChangeProcessor::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); DVLOG(1) << "Observed typed_url change."; if (type == chrome::NOTIFICATION_HISTORY_URLS_MODIFIED) { @@ -239,7 +239,7 @@ void TypedUrlChangeProcessor::ApplyChangesFromSyncModel( const syncer::BaseTransaction* trans, int64 model_version, const syncer::ImmutableChangeRecordList& changes) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); syncer::ReadNode typed_url_root(trans); if (typed_url_root.InitByTagLookup(kTypedUrlTag) != @@ -295,7 +295,7 @@ void TypedUrlChangeProcessor::ApplyChangesFromSyncModel( } void TypedUrlChangeProcessor::CommitChangesFromSyncModel() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); // Make sure we stop listening for changes while we're modifying the backend, // so we don't try to re-apply these changes to the sync DB. @@ -318,13 +318,13 @@ void TypedUrlChangeProcessor::CommitChangesFromSyncModel() { } void TypedUrlChangeProcessor::StartImpl(Profile* profile) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); DCHECK_EQ(profile, profile_); StartObserving(); } void TypedUrlChangeProcessor::StartObserving() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); DCHECK(profile_); notification_registrar_.Add( this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED, @@ -338,7 +338,7 @@ void TypedUrlChangeProcessor::StartObserving() { } void TypedUrlChangeProcessor::StopObserving() { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); DCHECK(profile_); notification_registrar_.Remove( this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED, diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc index 4ad83a4..afa4a99 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator.cc +++ b/chrome/browser/sync/glue/typed_url_model_associator.cc @@ -64,7 +64,7 @@ TypedUrlModelAssociator::TypedUrlModelAssociator( DataTypeErrorHandler* error_handler) : sync_service_(sync_service), history_backend_(history_backend), - expected_loop_(MessageLoop::current()), + expected_loop_(base::MessageLoop::current()), pending_abort_(false), error_handler_(error_handler), num_db_accesses_(0), @@ -174,7 +174,7 @@ int TypedUrlModelAssociator::GetErrorPercentage() const { syncer::SyncError TypedUrlModelAssociator::DoAssociateModels() { DVLOG(1) << "Associating TypedUrl Models"; syncer::SyncError error; - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); if (IsAbortPending()) return syncer::SyncError(); history::URLRows typed_urls; @@ -452,7 +452,7 @@ sync_pb::TypedUrlSpecifics TypedUrlModelAssociator::FilterExpiredVisits( bool TypedUrlModelAssociator::DeleteAllNodes( syncer::WriteTransaction* trans) { - DCHECK(expected_loop_ == MessageLoop::current()); + DCHECK(expected_loop_ == base::MessageLoop::current()); // Just walk through all our child nodes and delete them. syncer::ReadNode typed_url_root(trans); diff --git a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc index 911007d..ce64106 100644 --- a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc @@ -96,7 +96,7 @@ class SyncUIDataTypeControllerTest : public testing::Test { message_loop_.RunUntilIdle(); } - MessageLoopForUI message_loop_; + base::MessageLoopForUI message_loop_; content::TestBrowserThread ui_thread_; ProfileMock profile_; scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_; diff --git a/chrome/browser/sync/glue/ui_model_worker_unittest.cc b/chrome/browser/sync/glue/ui_model_worker_unittest.cc index e4de282..dd76963 100644 --- a/chrome/browser/sync/glue/ui_model_worker_unittest.cc +++ b/chrome/browser/sync/glue/ui_model_worker_unittest.cc @@ -32,7 +32,7 @@ class UIModelWorkerVisitor { EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); was_run_->Signal(); if (quit_loop_when_run_) - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); return syncer::SYNCER_OK; } @@ -98,7 +98,7 @@ class SyncUIModelWorkerTest : public testing::Test { base::Thread* core_thread() { return &faux_core_thread_; } base::Thread* syncer_thread() { return &faux_syncer_thread_; } private: - MessageLoop faux_ui_loop_; + base::MessageLoop faux_ui_loop_; scoped_ptr<content::TestBrowserThread> ui_thread_; base::Thread faux_syncer_thread_; base::Thread faux_core_thread_; @@ -116,7 +116,7 @@ TEST_F(SyncUIModelWorkerTest, ScheduledWorkRunsOnUILoop) { // We are on the UI thread, so run our loop to process the // (hopefully) scheduled task from a SyncShare invocation. - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); bmw()->OnSyncerShutdownComplete(); bmw()->Stop(); diff --git a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc index 16f9db0..a32eb8af 100644 --- a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc +++ b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc @@ -97,7 +97,7 @@ class ProfileSyncComponentsFactoryImplTest : public testing::Test { CheckDefaultDatatypesInMapExcept(&controller_states, type); } - MessageLoop message_loop_; + base::MessageLoop message_loop_; content::TestBrowserThread ui_thread_; scoped_ptr<Profile> profile_; scoped_ptr<CommandLine> command_line_; diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 40ee817..bfea304 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -841,7 +841,7 @@ void ProfileSyncService::OnUnrecoverableErrorImpl( << " -- ProfileSyncService unusable: " << message; // Shut all data types down. - MessageLoop::current()->PostTask(FROM_HERE, + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&ProfileSyncService::ShutdownImpl, weak_factory_.GetWeakPtr(), delete_sync_database)); } @@ -864,7 +864,7 @@ void ProfileSyncService::DisableBrokenDatatype( failed_datatypes_handler_.UpdateFailedDatatypes(errors, FailedDatatypesHandler::RUNTIME); - MessageLoop::current()->PostTask(FROM_HERE, + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&ProfileSyncService::ReconfigureDatatypeManager, weak_factory_.GetWeakPtr())); } @@ -967,7 +967,7 @@ void ProfileSyncService::OnSyncCycleCompleted() { // model associator listens too. Also consider somehow plumbing the current // server time as last reported by CheckServerReachable, so we don't have to // rely on the local clock, which may be off significantly. - MessageLoop::current()->PostTask(FROM_HERE, + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&browser_sync::SessionModelAssociator::DeleteStaleSessions, GetSessionModelAssociator()->AsWeakPtr())); } @@ -1302,7 +1302,7 @@ void ProfileSyncService::OnConfigureDone( } // Now handle partial success and full success. - MessageLoop::current()->PostTask(FROM_HERE, + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&ProfileSyncService::OnSyncConfigureDone, weak_factory_.GetWeakPtr(), result)); diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc index b2d88c2..8ffcbb0 100644 --- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc @@ -592,7 +592,7 @@ class ProfileSyncServiceAutofillTest sync_service_->RegisterDataTypeController(data_type_controller); sync_service_->Initialize(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); // It's possible this test triggered an unrecoverable error, in which case // we can't get the sync count. diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc index 193f167..1f98c7b 100644 --- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc @@ -468,7 +468,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test { EXPECT_EQ(GetSyncBookmarkCount(), syncer_merge_result_.num_items_after_association()); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Set up change processor. change_processor_.reset( @@ -655,7 +655,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test { private: // Used by both |ui_thread_| and |file_thread_|. - MessageLoop message_loop_; + base::MessageLoop message_loop_; content::TestBrowserThread ui_thread_; // Needed by |model_|. content::TestBrowserThread file_thread_; @@ -1867,7 +1867,7 @@ TEST_F(ProfileSyncServiceBookmarkTestWithData, UpdateTransactionVersion) { LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE); StartSync(); WriteTestDataToBookmarkModel(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); BookmarkNodeVersionMap initial_versions; @@ -1892,7 +1892,7 @@ TEST_F(ProfileSyncServiceBookmarkTestWithData, UpdateTransactionVersion) { // the same. const BookmarkNode* bookmark_bar = model_->bookmark_bar_node(); model_->Remove(bookmark_bar, 0); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); BookmarkNodeVersionMap new_versions; GetTransactionVersions(model_->root_node(), &new_versions); EXPECT_EQ(initial_versions[model_->root_node()->id()] + 1, @@ -1906,7 +1906,7 @@ TEST_F(ProfileSyncServiceBookmarkTestWithData, UpdateTransactionVersion) { const BookmarkNode* changed_bookmark = model_->bookmark_bar_node()->GetChild(0); model_->SetTitle(changed_bookmark, WideToUTF16Hack(L"test")); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); GetTransactionVersions(model_->root_node(), &new_versions); EXPECT_EQ(initial_versions[model_->root_node()->id()] + 2, new_versions[model_->root_node()->id()]); diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc index 90dc180..3d42e91 100644 --- a/chrome/browser/sync/profile_sync_service_harness.cc +++ b/chrome/browser/sync/profile_sync_service_harness.cc @@ -292,7 +292,7 @@ void ProfileSyncServiceHarness::SignalStateCompleteWithNextState( void ProfileSyncServiceHarness::SignalStateComplete() { if (waiting_for_status_change_) - MessageLoop::current()->QuitWhenIdle(); + base::MessageLoop::current()->QuitWhenIdle(); } bool ProfileSyncServiceHarness::RunStateChangeMachine() { @@ -754,8 +754,8 @@ bool ProfileSyncServiceHarness::AwaitStatusChangeWithTimeout( // Set the flag to tell SignalStateComplete() that it's OK to quit out of // the MessageLoop if we hit a state transition. waiting_for_status_change_ = true; - MessageLoop* loop = MessageLoop::current(); - MessageLoop::ScopedNestableTaskAllower allow(loop); + base::MessageLoop* loop = base::MessageLoop::current(); + base::MessageLoop::ScopedNestableTaskAllower allow(loop); loop->PostDelayedTask( FROM_HERE, base::Bind(&StateChangeTimeoutEvent::Callback, diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc index fa0e680..a5fd446 100644 --- a/chrome/browser/sync/profile_sync_service_password_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc @@ -78,7 +78,7 @@ ACTION_P(AcquireSyncTransaction, password_test_service) { } static void QuitMessageLoop() { - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } class NullPasswordStore : public MockPasswordStore { @@ -248,12 +248,12 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest { sync_service_->RegisterDataTypeController(data_type_controller); sync_service_->Initialize(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); FlushLastDBTask(); sync_service_->SetEncryptionPassphrase("foo", ProfileSyncService::IMPLICIT); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } } diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc index e7d56f0..ce02d29 100644 --- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc @@ -182,7 +182,7 @@ class ProfileSyncServicePreferenceTest GaiaConstants::kSyncService, "token"); sync_service_->Initialize(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); // It's possible this test triggered an unrecoverable error, in which case // we can't get the preference count. diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc index 44d1dfb..91cef4b 100644 --- a/chrome/browser/sync/profile_sync_service_session_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc @@ -249,9 +249,9 @@ class ProfileSyncServiceSessionTest // Pump messages posted by the sync core thread (which may end up // posting on the IO thread). - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); io_thread_.Stop(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); BrowserWithTestWindowTest::TearDown(); } @@ -293,7 +293,7 @@ class ProfileSyncServiceSessionTest TokenServiceFactory::GetForProfile(profile())->IssueAuthTokenForTest( GaiaConstants::kSyncService, "token"); sync_service_->Initialize(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); return true; } @@ -1200,7 +1200,7 @@ TEST_F(ProfileSyncServiceSessionTest, Favicons) { // Update associator. model_associator_->AssociateForeignSpecifics(meta, base::Time()); model_associator_->AssociateForeignSpecifics(tab, base::Time()); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); ASSERT_FALSE(model_associator_->GetSyncedFaviconForPageURL(url, &favicon)); // Now add a favicon. @@ -1208,7 +1208,7 @@ TEST_F(ProfileSyncServiceSessionTest, Favicons) { tab.mutable_tab()->set_favicon_type(sync_pb::SessionTab::TYPE_WEB_FAVICON); tab.mutable_tab()->set_favicon("data"); model_associator_->AssociateForeignSpecifics(tab, base::Time()); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); ASSERT_TRUE(model_associator_->GetSyncedFaviconForPageURL(url, &favicon)); ASSERT_TRUE(CompareMemoryToString("data", favicon)); @@ -1219,7 +1219,7 @@ TEST_F(ProfileSyncServiceSessionTest, Favicons) { tab.mutable_tab()->clear_favicon_type(); tab.mutable_tab()->clear_favicon(); model_associator_->AssociateForeignSpecifics(tab, base::Time()); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); ASSERT_TRUE(model_associator_->GetSyncedFaviconForPageURL(url, &favicon)); } diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc index b2fc564..168667a 100644 --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc @@ -132,7 +132,7 @@ class ProfileSyncServiceStartupTest : public testing::Test { return data_type_manager; } - MessageLoop ui_loop_; + base::MessageLoop ui_loop_; content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; content::TestBrowserThread file_thread_; @@ -318,7 +318,7 @@ TEST_F(ProfileSyncServiceStartupTest, StartInvalidCredentials) { token_service->IssueAuthTokenForTest( GaiaConstants::kSyncService, "sync_token"); sync_->SetSetupInProgress(false); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); // Verify we successfully finish startup and configuration. EXPECT_TRUE(sync_->ShouldPushChanges()); diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc index 0dd8d0f..15b88f1 100644 --- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc @@ -230,7 +230,7 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest { sync_service_->RegisterDataTypeController(data_type_controller); sync_service_->Initialize(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } return model_associator; } diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc index 0c8d0b9..00afd97 100644 --- a/chrome/browser/sync/profile_sync_service_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_unittest.cc @@ -139,7 +139,7 @@ class ProfileSyncServiceTestHarness { scoped_ptr<TestingProfile> profile; private: - MessageLoop ui_loop_; + base::MessageLoop ui_loop_; // Needed by |service|. content::TestBrowserThread ui_thread_; content::TestBrowserThread db_thread_; diff --git a/chrome/browser/sync/profile_sync_test_util.h b/chrome/browser/sync/profile_sync_test_util.h index 509bcf5..aedc4c5 100644 --- a/chrome/browser/sync/profile_sync_test_util.h +++ b/chrome/browser/sync/profile_sync_test_util.h @@ -30,7 +30,7 @@ ACTION_P(Notify, type) { ACTION(QuitUIMessageLoop) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } class ProfileSyncServiceObserverMock : public ProfileSyncServiceObserver { diff --git a/chrome/browser/sync/sync_prefs_unittest.cc b/chrome/browser/sync/sync_prefs_unittest.cc index 1b78842..042df83 100644 --- a/chrome/browser/sync/sync_prefs_unittest.cc +++ b/chrome/browser/sync/sync_prefs_unittest.cc @@ -30,7 +30,7 @@ class SyncPrefsTest : public testing::Test { TestingPrefServiceSyncable pref_service_; private: - MessageLoop loop_; + base::MessageLoop loop_; }; TEST_F(SyncPrefsTest, Basic) { diff --git a/chrome/browser/sync/sync_ui_util_unittest.cc b/chrome/browser/sync/sync_ui_util_unittest.cc index 275dcc9..7b8dd84 100644 --- a/chrome/browser/sync/sync_ui_util_unittest.cc +++ b/chrome/browser/sync/sync_ui_util_unittest.cc @@ -69,7 +69,7 @@ void VerifySyncGlobalErrorResult(NiceMock<ProfileSyncServiceMock>* service, // Test that GetStatusLabelsForSyncGlobalError returns an error if a // passphrase is required. TEST(SyncUIUtilTest, PassphraseGlobalError) { - MessageLoopForUI message_loop; + base::MessageLoopForUI message_loop; content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); scoped_ptr<Profile> profile( ProfileSyncServiceMock::MakeSignedInTestingProfile()); @@ -89,7 +89,7 @@ TEST(SyncUIUtilTest, PassphraseGlobalError) { // Test that GetStatusLabelsForSyncGlobalError returns an error if a // passphrase is required and not for auth errors. TEST(SyncUIUtilTest, AuthAndPassphraseGlobalError) { - MessageLoopForUI message_loop; + base::MessageLoopForUI message_loop; content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); scoped_ptr<Profile> profile( ProfileSyncServiceMock::MakeSignedInTestingProfile()); @@ -121,7 +121,7 @@ TEST(SyncUIUtilTest, AuthAndPassphraseGlobalError) { // Test that GetStatusLabelsForSyncGlobalError does not indicate errors for // auth errors (these are reported through SigninGlobalError). TEST(SyncUIUtilTest, AuthStateGlobalError) { - MessageLoopForUI message_loop; + base::MessageLoopForUI message_loop; content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); scoped_ptr<Profile> profile( ProfileSyncServiceMock::MakeSignedInTestingProfile()); diff --git a/chrome/browser/sync/test/integration/autofill_helper.cc b/chrome/browser/sync/test/integration/autofill_helper.cc index ed4adfd..e848a17 100644 --- a/chrome/browser/sync/test/integration/autofill_helper.cc +++ b/chrome/browser/sync/test/integration/autofill_helper.cc @@ -241,7 +241,7 @@ void SetProfiles(int profile, std::vector<AutofillProfile>* autofill_profiles) { PersonalDataManager* pdm = GetPersonalDataManager(profile); pdm->AddObserver(&observer); pdm->SetProfiles(autofill_profiles); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); pdm->RemoveObserver(&observer); } @@ -252,7 +252,7 @@ void SetCreditCards(int profile, std::vector<CreditCard>* credit_cards) { PersonalDataManager* pdm = GetPersonalDataManager(profile); pdm->AddObserver(&observer); pdm->SetCreditCards(credit_cards); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); pdm->RemoveObserver(&observer); } @@ -297,7 +297,7 @@ const std::vector<AutofillProfile*>& GetAllProfiles( PersonalDataManager* pdm = GetPersonalDataManager(profile); pdm->AddObserver(&observer); pdm->Refresh(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); pdm->RemoveObserver(&observer); return pdm->web_profiles(); } diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc index dc4a341..57f0931 100644 --- a/chrome/browser/sync/test/integration/bookmarks_helper.cc +++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc @@ -110,7 +110,7 @@ class FaviconChangeObserver : public BookmarkModelObserver { const BookmarkNode* node) OVERRIDE { if (model == model_ && node == node_) { if (!wait_for_load_ || (wait_for_load_ && node->is_favicon_loaded())) - MessageLoopForUI::current()->Quit(); + base::MessageLoopForUI::current()->Quit(); } } diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc index f06f261..dfc4e1a 100644 --- a/chrome/browser/sync/test/integration/passwords_helper.cc +++ b/chrome/browser/sync/test/integration/passwords_helper.cc @@ -59,7 +59,7 @@ class PasswordStoreConsumerHelper : public PasswordStoreConsumer { } // Quit the message loop to wake up passwords_helper::GetLogins. - MessageLoopForUI::current()->Quit(); + base::MessageLoopForUI::current()->Quit(); } private: diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index aa599a6..2b61276 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc @@ -79,7 +79,7 @@ class SyncServerStatusChecker : public net::URLFetcherDelegate { running_ = (source->GetStatus().status() == net::URLRequestStatus::SUCCESS && source->GetResponseCode() == 200 && data.find("ok") == 0); - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } bool running() const { return running_; } diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc index 73415c06..06d586a 100644 --- a/chrome/browser/sync/test_profile_sync_service.cc +++ b/chrome/browser/sync/test_profile_sync_service.cc @@ -88,7 +88,7 @@ void SyncBackendHostForProfileSyncTest::InitCore( if (synchronous_init_) { // The SyncBackend posts a task to the current loop when // initialization completes. - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); } } @@ -169,7 +169,7 @@ void SyncBackendHostForProfileSyncTest if (fail_initial_download_) { frontend()->OnSyncConfigureRetry(); if (synchronous_init_) - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } else { initial_download_closure_.Run(); initial_download_closure_.Reset(); @@ -258,7 +258,7 @@ void TestProfileSyncService::OnBackendInitialized( // TODO(akalin): Figure out a better way to do this. if (synchronous_backend_initialization_) { - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } } @@ -266,7 +266,7 @@ void TestProfileSyncService::OnConfigureDone( const browser_sync::DataTypeManager::ConfigureResult& result) { ProfileSyncService::OnConfigureDone(result); if (!synchronous_sync_configuration_) - MessageLoop::current()->Quit(); + base::MessageLoop::current()->Quit(); } UserShare* TestProfileSyncService::GetUserShare() const { |