| Index: chrome/browser/sync/glue/non_frontend_data_type_controller.cc
|
| ===================================================================
|
| --- chrome/browser/sync/glue/non_frontend_data_type_controller.cc (revision 94142)
|
| +++ chrome/browser/sync/glue/non_frontend_data_type_controller.cc (working copy)
|
| @@ -6,7 +6,6 @@
|
|
|
| #include "base/logging.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/sync/api/sync_error.h"
|
| #include "chrome/browser/sync/glue/change_processor.h"
|
| #include "chrome/browser/sync/glue/model_associator.h"
|
| #include "chrome/browser/sync/profile_sync_factory.h"
|
| @@ -105,11 +104,10 @@
|
| }
|
|
|
| base::TimeTicks start_time = base::TimeTicks::Now();
|
| - SyncError error;
|
| - bool merge_success = model_associator_->AssociateModels(&error);
|
| + bool merge_success = model_associator_->AssociateModels();
|
| RecordAssociationTime(base::TimeTicks::Now() - start_time);
|
| if (!merge_success) {
|
| - StartFailed(ASSOCIATION_FAILED, error.location());
|
| + StartFailed(ASSOCIATION_FAILED, FROM_HERE);
|
| return;
|
| }
|
|
|
| @@ -117,13 +115,11 @@
|
| StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, FROM_HERE);
|
| }
|
|
|
| -void NonFrontendDataTypeController::StartFailed(
|
| - StartResult result,
|
| +void NonFrontendDataTypeController::StartFailed(StartResult result,
|
| const tracked_objects::Location& location) {
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| model_associator_.reset();
|
| change_processor_.reset();
|
| - // TODO(zea): Send the full SyncError on failure and handle it higher up.
|
| StartDone(result, NOT_RUNNING, location);
|
| }
|
|
|
| @@ -220,10 +216,8 @@
|
|
|
| void NonFrontendDataTypeController::StopAssociation() {
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - if (model_associator_.get()) {
|
| - SyncError error;
|
| - model_associator_->DisassociateModels(&error);
|
| - }
|
| + if (model_associator_.get())
|
| + model_associator_->DisassociateModels();
|
| model_associator_.reset();
|
| change_processor_.reset();
|
| datatype_stopped_.Signal();
|
| @@ -243,7 +237,7 @@
|
| const std::string& message) {
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| RecordUnrecoverableError(from_here, message);
|
| - BrowserThread::PostTask(BrowserThread::UI, from_here, NewRunnableMethod(this,
|
| + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod(this,
|
| &NonFrontendDataTypeController::OnUnrecoverableErrorImpl, from_here,
|
| message));
|
| }
|
|
|