Index: chrome/browser/sync/profile_sync_service.cc |
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc |
index 7c2cf7514ab1cf0529b63248a5dbd54bf2a5af3e..985126b6070024634e25897952c8ce41ece361d1 100644 |
--- a/chrome/browser/sync/profile_sync_service.cc |
+++ b/chrome/browser/sync/profile_sync_service.cc |
@@ -948,24 +948,6 @@ void ProfileSyncService::OnUnrecoverableErrorImpl( |
browser_sync::SyncBackendHost::STOP_AND_CLAIM_THREAD)); |
} |
-// TODO(zea): Move this logic into the DataTypeController/DataTypeManager. |
-void ProfileSyncService::DisableDatatype(const syncer::SyncError& error) { |
- // First deactivate the type so that no further server changes are |
- // passed onto the change processor. |
- DeactivateDataType(error.model_type()); |
- |
- std::map<syncer::ModelType, syncer::SyncError> errors; |
- errors[error.model_type()] = error; |
- |
- // Update this before posting a task. So if a configure happens before |
- // the task that we are going to post, this type would still be disabled. |
- failed_data_types_handler_.UpdateFailedDataTypes(errors); |
- |
- base::MessageLoop::current()->PostTask(FROM_HERE, |
- base::Bind(&ProfileSyncService::ReconfigureDatatypeManager, |
- weak_factory_.GetWeakPtr())); |
-} |
- |
void ProfileSyncService::ReenableDatatype(syncer::ModelType type) { |
// Only reconfigure if the type actually had a data type or unready error. |
if (!failed_data_types_handler_.ResetDataTypeErrorFor(type) && |
@@ -1381,7 +1363,9 @@ void ProfileSyncService::OnEncryptedTypesChanged( |
syncer::SyncError::DATATYPE_POLICY_ERROR, |
"Delete directives not supported with encryption.", |
syncer::HISTORY_DELETE_DIRECTIVES); |
- DisableDatatype(error); |
+ FailedDataTypesHandler::TypeErrorMap error_map; |
+ error_map[error.model_type()] = error; |
+ failed_data_types_handler_.UpdateFailedDataTypes(error_map); |
haitaol1
2014/08/07 00:49:48
Is reconfiguration needed?
Nicolas Zea
2014/08/07 18:14:54
Yep, good catch.
|
} |
} |
@@ -1789,7 +1773,9 @@ void ProfileSyncService::OnUserChoseDatatypes( |
syncer::SyncError::DATATYPE_POLICY_ERROR, |
"Delete directives not supported with encryption.", |
syncer::HISTORY_DELETE_DIRECTIVES); |
- DisableDatatype(error); |
+ FailedDataTypesHandler::TypeErrorMap error_map; |
+ error_map[error.model_type()] = error; |
+ failed_data_types_handler_.UpdateFailedDataTypes(error_map); |
} |
ChangePreferredDataTypes(chosen_types); |
AcknowledgeSyncedTypes(); |