| Index: chrome/browser/sync/glue/sync_backend_host.cc
|
| diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
|
| index 7d720b08ae9d2f4128bd9e0a9655911acb1650da..ed5621fc973ce0b69154f90464e804d9b5edbee9 100644
|
| --- a/chrome/browser/sync/glue/sync_backend_host.cc
|
| +++ b/chrome/browser/sync/glue/sync_backend_host.cc
|
| @@ -269,7 +269,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().
|
| @@ -350,10 +350,11 @@ SyncBackendHost::SyncBackendHost(
|
| const base::WeakPtr<InvalidatorStorage>& invalidator_storage)
|
| : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(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),
|
| + core_(new Core(name,
|
| + profile_->GetPath().Append(kSyncDataFolderName),
|
| weak_ptr_factory_.GetWeakPtr())),
|
| initialization_state_(NOT_ATTEMPTED),
|
| sync_prefs_(sync_prefs),
|
| @@ -363,13 +364,12 @@ SyncBackendHost::SyncBackendHost(
|
| content::GetUserAgent(GURL()),
|
| invalidator_storage),
|
| frontend_(NULL),
|
| - cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {
|
| -}
|
| + cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {}
|
|
|
| SyncBackendHost::SyncBackendHost(Profile* profile)
|
| : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
|
| sync_thread_("Chrome_SyncThread"),
|
| - frontend_loop_(MessageLoop::current()),
|
| + frontend_loop_(base::MessageLoop::current()),
|
| profile_(profile),
|
| name_("Unknown"),
|
| initialization_state_(NOT_ATTEMPTED),
|
| @@ -379,8 +379,7 @@ SyncBackendHost::SyncBackendHost(Profile* profile)
|
| content::GetUserAgent(GURL()),
|
| base::WeakPtr<syncer::InvalidationStateTracker>()),
|
| frontend_(NULL),
|
| - cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {
|
| -}
|
| + cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {}
|
|
|
| SyncBackendHost::~SyncBackendHost() {
|
| DCHECK(!core_ && !frontend_) << "Must call Shutdown before destructor.";
|
| @@ -471,7 +470,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,
|
| @@ -480,7 +479,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,
|
| @@ -511,7 +510,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.
|
| @@ -535,7 +534,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());
|
| @@ -584,7 +583,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;
|
| @@ -837,7 +836,7 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop(
|
| const base::Callback<void(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(failed_configuration_types);
|
| }
|
| @@ -889,7 +888,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,
|
| @@ -926,8 +925,7 @@ SyncBackendHost::DoInitializeOptions::DoInitializeOptions(
|
| restored_keystore_key_for_bootstrapping),
|
| internal_components_factory(internal_components_factory),
|
| unrecoverable_error_handler(unrecoverable_error_handler),
|
| - report_unrecoverable_error_function(
|
| - report_unrecoverable_error_function) {
|
| + report_unrecoverable_error_function(report_unrecoverable_error_function) {
|
| }
|
|
|
| SyncBackendHost::DoInitializeOptions::~DoInitializeOptions() {}
|
| @@ -953,7 +951,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,
|
| @@ -982,7 +980,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);
|
| }
|
|
|
| @@ -997,7 +995,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();
|
| @@ -1029,10 +1027,10 @@ void SyncBackendHost::Core::OnConnectionStatusChange(
|
| syncer::ConnectionStatus status) {
|
| if (!sync_loop_)
|
| return;
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - host_.Call(
|
| - FROM_HERE,
|
| - &SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop, status);
|
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
|
| + host_.Call(FROM_HERE,
|
| + &SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop,
|
| + status);
|
| }
|
|
|
| void SyncBackendHost::Core::OnPassphraseRequired(
|
| @@ -1040,19 +1038,18 @@ void SyncBackendHost::Core::OnPassphraseRequired(
|
| const sync_pb::EncryptedData& pending_keys) {
|
| if (!sync_loop_)
|
| return;
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - host_.Call(
|
| - FROM_HERE,
|
| - &SyncBackendHost::NotifyPassphraseRequired, reason, pending_keys);
|
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
|
| + host_.Call(FROM_HERE,
|
| + &SyncBackendHost::NotifyPassphraseRequired,
|
| + reason,
|
| + pending_keys);
|
| }
|
|
|
| void SyncBackendHost::Core::OnPassphraseAccepted() {
|
| if (!sync_loop_)
|
| return;
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - host_.Call(
|
| - FROM_HERE,
|
| - &SyncBackendHost::NotifyPassphraseAccepted);
|
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
|
| + host_.Call(FROM_HERE, &SyncBackendHost::NotifyPassphraseAccepted);
|
| }
|
|
|
| void SyncBackendHost::Core::OnBootstrapTokenUpdated(
|
| @@ -1060,7 +1057,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,
|
| @@ -1070,19 +1067,16 @@ void SyncBackendHost::Core::OnBootstrapTokenUpdated(
|
| void SyncBackendHost::Core::OnStopSyncingPermanently() {
|
| if (!sync_loop_)
|
| return;
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - host_.Call(
|
| - FROM_HERE,
|
| - &SyncBackendHost::HandleStopSyncingPermanentlyOnFrontendLoop);
|
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
|
| + host_.Call(FROM_HERE,
|
| + &SyncBackendHost::HandleStopSyncingPermanentlyOnFrontendLoop);
|
| }
|
|
|
| void SyncBackendHost::Core::OnUpdatedToken(const std::string& token) {
|
| if (!sync_loop_)
|
| return;
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - host_.Call(
|
| - FROM_HERE,
|
| - &SyncBackendHost::NotifyUpdatedToken, token);
|
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
|
| + host_.Call(FROM_HERE, &SyncBackendHost::NotifyUpdatedToken, token);
|
| }
|
|
|
| void SyncBackendHost::Core::OnEncryptedTypesChanged(
|
| @@ -1090,7 +1084,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,
|
| @@ -1101,7 +1095,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,
|
| @@ -1125,18 +1119,17 @@ void SyncBackendHost::Core::OnActionableError(
|
| const syncer::SyncProtocolError& sync_error) {
|
| if (!sync_loop_)
|
| return;
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - host_.Call(
|
| - FROM_HERE,
|
| - &SyncBackendHost::HandleActionableErrorEventOnFrontendLoop,
|
| - sync_error);
|
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
|
| + host_.Call(FROM_HERE,
|
| + &SyncBackendHost::HandleActionableErrorEventOnFrontendLoop,
|
| + sync_error);
|
| }
|
|
|
| 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);
|
| @@ -1146,7 +1139,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);
|
| @@ -1226,7 +1219,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
|
| @@ -1238,7 +1231,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.
|
| @@ -1251,7 +1244,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).
|
| //
|
| @@ -1263,20 +1256,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_);
|
| - sync_manager_->GetEncryptionHandler()->SetEncryptionPassphrase(
|
| - passphrase, is_explicit);
|
| + 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";
|
|
|
| @@ -1329,13 +1322,12 @@ void SyncBackendHost::Core::DoFinishInitialProcessControlTypes() {
|
|
|
| void SyncBackendHost::Core::DoSetDecryptionPassphrase(
|
| const std::string& passphrase) {
|
| - DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| - sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase(
|
| - passphrase);
|
| + 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();
|
| }
|
|
|
| @@ -1349,7 +1341,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();
|
| @@ -1367,7 +1359,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_.get()) {
|
| save_changes_timer_.reset();
|
| if (registered_as_invalidation_handler_) {
|
| @@ -1387,7 +1379,7 @@ void SyncBackendHost::Core::DoConfigureSyncer(
|
| const syncer::ModelSafeRoutingInfo routing_info,
|
| const base::Callback<void(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,
|
| @@ -1397,15 +1389,14 @@ void SyncBackendHost::Core::DoConfigureSyncer(
|
| this,
|
| types_to_config,
|
| ready_task),
|
| - base::Bind(&SyncBackendHost::Core::DoRetryConfiguration,
|
| - this,
|
| - retry_callback));
|
| + base::Bind(
|
| + &SyncBackendHost::Core::DoRetryConfiguration, this, retry_callback));
|
| }
|
|
|
| void SyncBackendHost::Core::DoFinishConfigureDataTypes(
|
| syncer::ModelTypeSet types_to_config,
|
| const base::Callback<void(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;
|
| @@ -1424,14 +1415,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.";
|
| @@ -1442,7 +1433,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,
|
| @@ -1451,7 +1442,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();
|
| }
|
|
|
| @@ -1463,7 +1454,7 @@ void SyncBackendHost::AddExperimentalTypes() {
|
| }
|
|
|
| void SyncBackendHost::HandleControlTypesDownloadRetry() {
|
| - DCHECK_EQ(MessageLoop::current(), frontend_loop_);
|
| + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_);
|
| if (!frontend_)
|
| return;
|
|
|
| @@ -1476,7 +1467,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;
|
| @@ -1503,7 +1494,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;
|
|
|
| @@ -1544,7 +1535,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);
|
| }
|
|
|
| @@ -1552,7 +1543,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);
|
| }
|
|
|
| @@ -1560,7 +1551,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);
|
| }
|
|
|
| @@ -1582,7 +1573,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;
|
| @@ -1594,7 +1585,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();
|
| @@ -1616,23 +1607,22 @@ void SyncBackendHost::NotifyEncryptedTypesChanged(
|
| if (!frontend_)
|
| return;
|
|
|
| - DCHECK_EQ(MessageLoop::current(), frontend_loop_);
|
| - frontend_->OnEncryptedTypesChanged(
|
| - encrypted_types, encrypt_everything);
|
| + DCHECK_EQ(base::MessageLoop::current(), frontend_loop_);
|
| + frontend_->OnEncryptedTypesChanged(encrypted_types, encrypt_everything);
|
| }
|
|
|
| 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;
|
| @@ -1650,7 +1640,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);
|
|
|