Index: components/sync_driver/non_ui_data_type_controller.cc |
diff --git a/components/sync_driver/non_ui_data_type_controller.cc b/components/sync_driver/non_ui_data_type_controller.cc |
index 211f14230f08a5a37ad8265401533349911ac957..429b20181cff0745b367382edfcd51e78a9ade2a 100644 |
--- a/components/sync_driver/non_ui_data_type_controller.cc |
+++ b/components/sync_driver/non_ui_data_type_controller.cc |
@@ -24,9 +24,8 @@ NonUIDataTypeController::CreateSharedChangeProcessor() { |
NonUIDataTypeController::NonUIDataTypeController( |
scoped_refptr<base::MessageLoopProxy> ui_thread, |
const base::Closure& error_callback, |
- const DisableTypeCallback& disable_callback, |
SyncApiComponentFactory* sync_factory) |
- : DataTypeController(ui_thread, error_callback, disable_callback), |
+ : DataTypeController(ui_thread, error_callback), |
sync_factory_(sync_factory), |
state_(NOT_RUNNING), |
ui_thread_(ui_thread) { |
@@ -166,22 +165,20 @@ DataTypeController::State NonUIDataTypeController::state() const { |
return state_; |
} |
-void NonUIDataTypeController::OnSingleDatatypeUnrecoverableError( |
- const tracked_objects::Location& from_here, const std::string& message) { |
+void NonUIDataTypeController::OnSingleDataTypeUnrecoverableError( |
+ const syncer::SyncError& error) { |
DCHECK(!ui_thread_->BelongsToCurrentThread()); |
// TODO(tim): We double-upload some errors. See bug 383480. |
if (!error_callback_.is_null()) |
error_callback_.Run(); |
- ui_thread_->PostTask(from_here, |
+ ui_thread_->PostTask(error.location(), |
base::Bind(&NonUIDataTypeController::DisableImpl, |
this, |
- from_here, |
- message)); |
+ error)); |
} |
NonUIDataTypeController::NonUIDataTypeController() |
- : DataTypeController(base::MessageLoopProxy::current(), base::Closure(), |
- DisableTypeCallback()), |
+ : DataTypeController(base::MessageLoopProxy::current(), base::Closure()), |
sync_factory_(NULL) {} |
NonUIDataTypeController::~NonUIDataTypeController() {} |
@@ -272,15 +269,12 @@ void NonUIDataTypeController::AbortModelLoad() { |
} |
void NonUIDataTypeController::DisableImpl( |
- const tracked_objects::Location& from_here, |
- const std::string& message) { |
+ const syncer::SyncError& error) { |
DCHECK(ui_thread_->BelongsToCurrentThread()); |
UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeRunFailures", |
ModelTypeToHistogramInt(type()), |
syncer::MODEL_TYPE_COUNT); |
if (!start_callback_.is_null()) { |
haitaol1
2014/08/07 00:49:48
What happens if error happens after association?
|
- syncer::SyncError error( |
- from_here, syncer::SyncError::DATATYPE_ERROR, message, type()); |
syncer::SyncMergeResult local_merge_result(type()); |
local_merge_result.set_error(error); |
start_callback_.Run(RUNTIME_ERROR, |