Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1440)

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 513543004: [Sync] Rename FailedDataTypesHandler -> DataTypeStatusTable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 62b8b76c5349c3549335e04c29b152dab9e72243..0546c025e9262c30e5ee8c6aa4cc301987bd1d02 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -111,7 +111,7 @@ using browser_sync::SyncBackendHost;
using sync_driver::ChangeProcessor;
using sync_driver::DataTypeController;
using sync_driver::DataTypeManager;
-using sync_driver::FailedDataTypesHandler;
+using sync_driver::DataTypeStatusTable;
using syncer::ModelType;
using syncer::ModelTypeSet;
using syncer::JsBackend;
@@ -962,7 +962,7 @@ void ProfileSyncService::ClearStaleErrors() {
ClearUnrecoverableError();
last_actionable_error_ = SyncProtocolError();
// Clear the data type errors as well.
- failed_data_types_handler_.Reset();
+ data_type_status_table_.Reset();
}
void ProfileSyncService::ClearUnrecoverableError() {
@@ -1419,9 +1419,9 @@ void ProfileSyncService::OnEncryptedTypesChanged(
syncer::SyncError::DATATYPE_POLICY_ERROR,
"Delete directives not supported with encryption.",
syncer::HISTORY_DELETE_DIRECTIVES);
- FailedDataTypesHandler::TypeErrorMap error_map;
+ DataTypeStatusTable::TypeErrorMap error_map;
error_map[error.model_type()] = error;
- failed_data_types_handler_.UpdateFailedDataTypes(error_map);
+ data_type_status_table_.UpdateFailedDataTypes(error_map);
ReconfigureDatatypeManager();
}
}
@@ -1577,14 +1577,14 @@ void ProfileSyncService::OnConfigureDone(
// Something catastrophic had happened. We should only have one
// error representing it.
syncer::SyncError error =
- failed_data_types_handler_.GetUnrecoverableError();
+ data_type_status_table_.GetUnrecoverableError();
DCHECK(error.IsSet());
std::string message =
"Sync configuration failed with status " +
DataTypeManager::ConfigureStatusToString(configure_status_) +
" caused by " +
syncer::ModelTypeSetToString(
- failed_data_types_handler_.GetUnrecoverableErrorTypes()) +
+ data_type_status_table_.GetUnrecoverableErrorTypes()) +
": " + error.message();
LOG(ERROR) << "ProfileSyncService error: " << message;
OnInternalUnrecoverableError(error.location(),
@@ -1840,7 +1840,7 @@ void ProfileSyncService::OnUserChoseDatatypes(
UpdateSelectedTypesHistogram(sync_everything, chosen_types);
sync_prefs_.SetKeepEverythingSynced(sync_everything);
- failed_data_types_handler_.Reset();
+ data_type_status_table_.Reset();
if (GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES) &&
encrypted_types_.Has(syncer::SESSIONS)) {
syncer::SyncError error(
@@ -1848,9 +1848,9 @@ void ProfileSyncService::OnUserChoseDatatypes(
syncer::SyncError::DATATYPE_POLICY_ERROR,
"Delete directives not supported with encryption.",
syncer::HISTORY_DELETE_DIRECTIVES);
- FailedDataTypesHandler::TypeErrorMap error_map;
+ DataTypeStatusTable::TypeErrorMap error_map;
error_map[error.model_type()] = error;
- failed_data_types_handler_.UpdateFailedDataTypes(error_map);
+ data_type_status_table_.UpdateFailedDataTypes(error_map);
}
ChangePreferredDataTypes(chosen_types);
AcknowledgeSyncedTypes();
@@ -1878,7 +1878,7 @@ void ProfileSyncService::ChangePreferredDataTypes(
syncer::ModelTypeSet ProfileSyncService::GetActiveDataTypes() const {
const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes();
const syncer::ModelTypeSet failed_types =
- failed_data_types_handler_.GetFailedTypes();
+ data_type_status_table_.GetFailedTypes();
return Difference(preferred_types, failed_types);
}
@@ -1976,7 +1976,7 @@ void ProfileSyncService::ConfigureDataTypeManager() {
this,
backend_.get(),
this,
- &failed_data_types_handler_));
+ &data_type_status_table_));
// We create the migrator at the same time.
migrator_.reset(
@@ -2057,9 +2057,8 @@ base::Value* ProfileSyncService::GetTypeStatusMap() const {
return result.release();
}
- FailedDataTypesHandler::TypeErrorMap error_map =
- failed_data_types_handler_.GetAllErrors();
-
+ DataTypeStatusTable::TypeErrorMap error_map =
+ data_type_status_table_.GetAllErrors();
ModelTypeSet active_types;
ModelTypeSet passive_types;
ModelSafeRoutingInfo routing_info;
@@ -2574,9 +2573,9 @@ syncer::ModelTypeSet ProfileSyncService::GetDataTypesFromPreferenceProviders()
return types;
}
-const FailedDataTypesHandler& ProfileSyncService::failed_data_types_handler()
+const DataTypeStatusTable& ProfileSyncService::data_type_status_table()
const {
- return failed_data_types_handler_;
+ return data_type_status_table_;
}
void ProfileSyncService::OnInternalUnrecoverableError(
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698