| Index: chrome/browser/sync/glue/non_frontend_data_type_controller.cc
|
| diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
|
| index a68f6382f23a7dda40d6b512d3e926b91d808b62..b84db9b8050ec091aabfd679fd5c3e0932294b3b 100644
|
| --- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
|
| +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
|
| @@ -48,7 +48,7 @@ void NonFrontendDataTypeController::LoadModels(
|
| start_association_called_.Reset();
|
| start_models_failed_ = false;
|
| if (state_ != NOT_RUNNING) {
|
| - model_load_callback.Run(type(), SyncError(FROM_HERE,
|
| + model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
|
| "Model already loaded",
|
| type()));
|
| return;
|
| @@ -63,14 +63,14 @@ void NonFrontendDataTypeController::LoadModels(
|
| // get a false it means they failed.
|
| DCHECK(state_ == NOT_RUNNING || state_ == MODEL_STARTING
|
| || state_ == DISABLED);
|
| - model_load_callback.Run(type(), SyncError(FROM_HERE,
|
| + model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
|
| "Failed loading",
|
| type()));
|
| return;
|
| }
|
| state_ = MODEL_LOADED;
|
|
|
| - model_load_callback.Run(type(), SyncError());
|
| + model_load_callback.Run(type(), csync::SyncError());
|
| }
|
|
|
| void NonFrontendDataTypeController::OnModelLoaded() {
|
| @@ -87,7 +87,8 @@ void NonFrontendDataTypeController::StartAssociating(
|
| state_ = ASSOCIATING;
|
| start_callback_ = start_callback;
|
| if (!StartAssociationAsync()) {
|
| - SyncError error(FROM_HERE, "Failed to post StartAssociation", type());
|
| + csync::SyncError error(
|
| + FROM_HERE, "Failed to post StartAssociation", type());
|
| StartDoneImpl(ASSOCIATION_FAILED, DISABLED, error);
|
| }
|
| }
|
| @@ -100,7 +101,7 @@ void NonFrontendDataTypeController::StopWhileAssociating() {
|
| if (model_associator_.get())
|
| model_associator_->AbortAssociation();
|
| if (!start_association_called_.IsSignaled()) {
|
| - StartDoneImpl(ABORTED, NOT_RUNNING, SyncError());
|
| + StartDoneImpl(ABORTED, NOT_RUNNING, csync::SyncError());
|
| return; // There is nothing more for us to do.
|
| }
|
| }
|
| @@ -127,7 +128,7 @@ void NonFrontendDataTypeController::StopWhileAssociating() {
|
|
|
| }
|
|
|
| - StartDoneImpl(ABORTED, STOPPING, SyncError());
|
| + StartDoneImpl(ABORTED, STOPPING, csync::SyncError());
|
| }
|
|
|
| namespace {
|
| @@ -284,7 +285,7 @@ bool NonFrontendDataTypeController::StartModels() {
|
| }
|
|
|
| void NonFrontendDataTypeController::StartFailed(StartResult result,
|
| - const SyncError& error) {
|
| + const csync::SyncError& error) {
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| if (IsUnrecoverableResult(result))
|
| @@ -298,7 +299,7 @@ void NonFrontendDataTypeController::StartFailed(StartResult result,
|
| void NonFrontendDataTypeController::StartDone(
|
| DataTypeController::StartResult result,
|
| DataTypeController::State new_state,
|
| - const SyncError& error) {
|
| + const csync::SyncError& error) {
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| abort_association_complete_.Signal();
|
| base::AutoLock lock(abort_association_lock_);
|
| @@ -315,7 +316,7 @@ void NonFrontendDataTypeController::StartDone(
|
| void NonFrontendDataTypeController::StartDoneImpl(
|
| DataTypeController::StartResult result,
|
| DataTypeController::State new_state,
|
| - const SyncError& error) {
|
| + const csync::SyncError& error) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| // It's possible to have StartDoneImpl called first from the UI thread
|
| // (due to Stop being called) and then posted from the non-UI thread. In
|
| @@ -439,19 +440,19 @@ void NonFrontendDataTypeController::StartAssociation() {
|
| DCHECK_EQ(state_, ASSOCIATING);
|
|
|
| if (!model_associator_->CryptoReadyIfNecessary()) {
|
| - StartFailed(NEEDS_CRYPTO, SyncError());
|
| + StartFailed(NEEDS_CRYPTO, csync::SyncError());
|
| return;
|
| }
|
|
|
| bool sync_has_nodes = false;
|
| if (!model_associator_->SyncModelHasUserCreatedNodes(&sync_has_nodes)) {
|
| - SyncError error(FROM_HERE, "Failed to load sync nodes", type());
|
| + csync::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
|
| StartFailed(UNRECOVERABLE_ERROR, error);
|
| return;
|
| }
|
|
|
| base::TimeTicks start_time = base::TimeTicks::Now();
|
| - SyncError error;
|
| + csync::SyncError error;
|
| error = model_associator_->AssociateModels();
|
| // TODO(lipalani): crbug.com/122690 - handle abort.
|
| RecordAssociationTime(base::TimeTicks::Now() - start_time);
|
| @@ -462,7 +463,7 @@ void NonFrontendDataTypeController::StartAssociation() {
|
|
|
| profile_sync_service_->ActivateDataType(type(), model_safe_group(),
|
| change_processor());
|
| - StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, SyncError());
|
| + StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, csync::SyncError());
|
| }
|
|
|
| bool NonFrontendDataTypeController::StopAssociationAsync() {
|
| @@ -495,7 +496,7 @@ void NonFrontendDataTypeController::StopAssociation() {
|
| DCHECK(!HasOneRef());
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| if (model_associator_.get()) {
|
| - SyncError error; // Not used.
|
| + csync::SyncError error; // Not used.
|
| error = model_associator_->DisassociateModels();
|
| }
|
| model_associator_.reset();
|
|
|