diff options
Diffstat (limited to 'chrome/browser/sync/glue')
10 files changed, 28 insertions, 28 deletions
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc index 8661e14..1c57df2 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc @@ -109,7 +109,7 @@ void AutofillDataTypeController::Stop() { // thread to finish the StartImpl() task. if (state_ == ASSOCIATING) { { - AutoLock lock(abort_association_lock_); + base::AutoLock lock(abort_association_lock_); abort_association_ = true; if (model_associator_.get()) model_associator_->AbortAssociation(); @@ -189,7 +189,7 @@ void AutofillDataTypeController::StartImpl() { // No additional services need to be started before we can proceed // with model association. { - AutoLock lock(abort_association_lock_); + base::AutoLock lock(abort_association_lock_); if (abort_association_) { abort_association_complete_.Signal(); return; @@ -232,7 +232,7 @@ void AutofillDataTypeController::StartDone( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); abort_association_complete_.Signal(); - AutoLock lock(abort_association_lock_); + base::AutoLock lock(abort_association_lock_); if (!abort_association_) { BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod( diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.h b/chrome/browser/sync/glue/autofill_data_type_controller.h index 2daedb42..05b964c 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.h +++ b/chrome/browser/sync/glue/autofill_data_type_controller.h @@ -101,7 +101,7 @@ class AutofillDataTypeController : public DataTypeController, NotificationRegistrar notification_registrar_; - Lock abort_association_lock_; + base::Lock abort_association_lock_; bool abort_association_; base::WaitableEvent abort_association_complete_; diff --git a/chrome/browser/sync/glue/autofill_model_associator.cc b/chrome/browser/sync/glue/autofill_model_associator.cc index 43e4db6..14b9f2b 100644 --- a/chrome/browser/sync/glue/autofill_model_associator.cc +++ b/chrome/browser/sync/glue/autofill_model_associator.cc @@ -136,7 +136,7 @@ bool AutofillModelAssociator::AssociateModels() { VLOG(1) << "Associating Autofill Models"; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); { - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = false; } @@ -401,7 +401,7 @@ bool AutofillModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) { void AutofillModelAssociator::AbortAssociation() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = true; } @@ -454,7 +454,7 @@ bool AutofillModelAssociator::GetSyncIdForTaggedNode(const std::string& tag, } bool AutofillModelAssociator::IsAbortPending() { - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); return abort_association_pending_; } diff --git a/chrome/browser/sync/glue/autofill_model_associator.h b/chrome/browser/sync/glue/autofill_model_associator.h index fb660e6..a0eee27 100644 --- a/chrome/browser/sync/glue/autofill_model_associator.h +++ b/chrome/browser/sync/glue/autofill_model_associator.h @@ -12,8 +12,8 @@ #include <vector> #include "base/basictypes.h" -#include "base/lock.h" #include "base/ref_counted.h" +#include "base/synchronization/lock.h" #include "chrome/browser/autofill/personal_data_manager.h" #include "chrome/browser/sync/engine/syncapi.h" #include "chrome/browser/sync/glue/model_associator.h" @@ -183,7 +183,7 @@ class AutofillModelAssociator // Abort association pending flag and lock. If this is set to true // (via the AbortAssociation method), return from the // AssociateModels method as soon as possible. - Lock abort_association_pending_lock_; + base::Lock abort_association_pending_lock_; bool abort_association_pending_; int number_of_entries_created_; diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.cc b/chrome/browser/sync/glue/autofill_profile_model_associator.cc index c517e2c..d6a6792 100644 --- a/chrome/browser/sync/glue/autofill_profile_model_associator.cc +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.cc @@ -129,7 +129,7 @@ bool AutofillProfileModelAssociator::AssociateModels() { VLOG(1) << "Associating Autofill Models"; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); { - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = false; } @@ -458,7 +458,7 @@ int64 AutofillProfileModelAssociator::GetSyncIdFromChromeId( void AutofillProfileModelAssociator::AbortAssociation() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = true; } @@ -469,7 +469,7 @@ const std::string* AutofillProfileModelAssociator::GetChromeNodeFromSyncId( } bool AutofillProfileModelAssociator::IsAbortPending() { - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); return abort_association_pending_; } diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.h b/chrome/browser/sync/glue/autofill_profile_model_associator.h index e2abdaf..3286283 100644 --- a/chrome/browser/sync/glue/autofill_profile_model_associator.h +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.h @@ -12,8 +12,8 @@ #include <vector> #include "base/basictypes.h" -#include "base/lock.h" #include "base/ref_counted.h" +#include "base/synchronization/lock.h" #include "chrome/browser/autofill/personal_data_manager.h" #include "chrome/browser/sync/engine/syncapi.h" #include "chrome/browser/sync/glue/model_associator.h" @@ -175,7 +175,7 @@ class AutofillProfileModelAssociator // Abort association pending flag and lock. If this is set to true // (via the AbortAssociation method), return from the // AssociateModels method as soon as possible. - Lock abort_association_pending_lock_; + base::Lock abort_association_pending_lock_; bool abort_association_pending_; int number_of_profiles_created_; diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc index 3c9d01a..d6708b5 100644 --- a/chrome/browser/sync/glue/password_model_associator.cc +++ b/chrome/browser/sync/glue/password_model_associator.cc @@ -41,7 +41,7 @@ PasswordModelAssociator::~PasswordModelAssociator() {} bool PasswordModelAssociator::AssociateModels() { DCHECK(expected_loop_ == MessageLoop::current()); { - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = false; } @@ -194,7 +194,7 @@ bool PasswordModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) { void PasswordModelAssociator::AbortAssociation() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); abort_association_pending_ = true; } @@ -210,7 +210,7 @@ bool PasswordModelAssociator::InitSyncNodeFromChromeId( } bool PasswordModelAssociator::IsAbortPending() { - AutoLock lock(abort_association_pending_lock_); + base::AutoLock lock(abort_association_pending_lock_); return abort_association_pending_; } diff --git a/chrome/browser/sync/glue/password_model_associator.h b/chrome/browser/sync/glue/password_model_associator.h index 15eb3724..cfe0dab 100644 --- a/chrome/browser/sync/glue/password_model_associator.h +++ b/chrome/browser/sync/glue/password_model_associator.h @@ -11,7 +11,7 @@ #include <vector> #include "base/basictypes.h" -#include "base/lock.h" +#include "base/synchronization/lock.h" #include "base/task.h" #include "chrome/browser/history/history_types.h" #include "chrome/browser/sync/glue/model_associator.h" @@ -132,7 +132,7 @@ class PasswordModelAssociator // Abort association pending flag and lock. If this is set to true // (via the AbortAssociation method), return from the // AssociateModels method as soon as possible. - Lock abort_association_pending_lock_; + base::Lock abort_association_pending_lock_; bool abort_association_pending_; MessageLoop* expected_loop_; diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index 62b9aae..3e600e1 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -156,7 +156,7 @@ std::string SyncBackendHost::RestoreEncryptionBootstrapToken() { } bool SyncBackendHost::IsNigoriEnabled() const { - AutoLock lock(registrar_lock_); + base::AutoLock lock(registrar_lock_); // Note that NIGORI is only ever added/removed from routing_info once, // during initialization / first configuration, so there is no real 'race' // possible here or possibility of stale return value. @@ -333,7 +333,7 @@ void SyncBackendHost::ConfigureDataTypes( bool deleted_type = false; { - AutoLock lock(registrar_lock_); + base::AutoLock lock(registrar_lock_); for (DataTypeController::TypeMap::const_iterator it = data_type_controllers.begin(); it != data_type_controllers.end(); ++it) { @@ -391,7 +391,7 @@ void SyncBackendHost::RequestNudge() { void SyncBackendHost::ActivateDataType( DataTypeController* data_type_controller, ChangeProcessor* change_processor) { - AutoLock lock(registrar_lock_); + base::AutoLock lock(registrar_lock_); // Ensure that the given data type is in the PASSIVE group. browser_sync::ModelSafeRoutingInfo::iterator i = @@ -411,7 +411,7 @@ void SyncBackendHost::ActivateDataType( void SyncBackendHost::DeactivateDataType( DataTypeController* data_type_controller, ChangeProcessor* change_processor) { - AutoLock lock(registrar_lock_); + base::AutoLock lock(registrar_lock_); registrar_.routing_info.erase(data_type_controller->type()); std::map<syncable::ModelType, ChangeProcessor*>::size_type erased = @@ -516,7 +516,7 @@ const SyncSessionSnapshot* SyncBackendHost::GetLastSessionSnapshot() const { } void SyncBackendHost::GetWorkers(std::vector<ModelSafeWorker*>* out) { - AutoLock lock(registrar_lock_); + base::AutoLock lock(registrar_lock_); out->clear(); for (WorkerMap::const_iterator it = registrar_.workers.begin(); it != registrar_.workers.end(); ++it) { @@ -525,7 +525,7 @@ void SyncBackendHost::GetWorkers(std::vector<ModelSafeWorker*>* out) { } void SyncBackendHost::GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) { - AutoLock lock(registrar_lock_); + base::AutoLock lock(registrar_lock_); ModelSafeRoutingInfo copy(registrar_.routing_info); out->swap(copy); } @@ -771,7 +771,7 @@ void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop() { bool SyncBackendHost::Core::IsCurrentThreadSafeForModel( syncable::ModelType model_type) { - AutoLock lock(host_->registrar_lock_); + base::AutoLock lock(host_->registrar_lock_); browser_sync::ModelSafeRoutingInfo::const_iterator routing_it = host_->registrar_.routing_info.find(model_type); diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h index cd418aa..964f7a5 100644 --- a/chrome/browser/sync/glue/sync_backend_host.h +++ b/chrome/browser/sync/glue/sync_backend_host.h @@ -11,9 +11,9 @@ #include <vector> #include "base/file_path.h" -#include "base/lock.h" #include "base/message_loop.h" #include "base/ref_counted.h" +#include "base/synchronization/lock.h" #include "base/threading/thread.h" #include "base/timer.h" #include "base/utf_string_conversions.h" @@ -507,7 +507,7 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar { // pointer value", and then invoke methods), because lifetimes are managed on // the UI thread. Of course, this comment only applies to ModelSafeWorker // impls that are themselves thread-safe, such as UIModelWorker. - mutable Lock registrar_lock_; + mutable base::Lock registrar_lock_; // The frontend which we serve (and are owned by). SyncFrontend* frontend_; |