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

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

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix compile Created 9 years, 5 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 ebeca38389ea2888a94c24c97b46995224d16a30..daadef40bef3d348f50681462d642286584fea46 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1238,13 +1238,12 @@ void ProfileSyncService::Observe(int type,
break;
}
case chrome::NOTIFICATION_SYNC_CONFIGURE_DONE: {
- DataTypeManager::ConfigureResultWithErrorLocation* result_with_location =
- Details<DataTypeManager::ConfigureResultWithErrorLocation>(
- details).ptr();
+ DataTypeManager::ConfigureResult* result =
+ Details<DataTypeManager::ConfigureResult>(details).ptr();
- DataTypeManager::ConfigureResult result = result_with_location->result;
- VLOG(1) << "PSS SYNC_CONFIGURE_DONE called with result: " << result;
- if (result == DataTypeManager::ABORTED &&
+ DataTypeManager::ConfigureStatus status = result->status;
+ VLOG(1) << "PSS SYNC_CONFIGURE_DONE called with status: " << status;
+ if (status == DataTypeManager::ABORTED &&
expect_sync_configuration_aborted_) {
VLOG(0) << "ProfileSyncService::Observe Sync Configure aborted";
expect_sync_configuration_aborted_ = false;
@@ -1252,11 +1251,14 @@ void ProfileSyncService::Observe(int type,
}
// Clear out the gaia password if it is already there.
gaia_password_ = std::string();
- if (result != DataTypeManager::OK) {
+ if (status != DataTypeManager::OK) {
VLOG(0) << "ProfileSyncService::Observe: Unrecoverable error detected";
- std::string message = StringPrintf("Sync Configuration failed with %d",
- result);
- OnUnrecoverableError(*(result_with_location->location), message);
+ std::string message =
+ StringPrintf(
+ "Sync Configuration failed while configuring %s with result %d",
+ syncable::ModelTypeSetToString(result->failed_types).c_str(),
+ status);
+ OnUnrecoverableError(result->location, message);
cached_passphrase_ = CachedPassphrase();
return;
}

Powered by Google App Engine
This is Rietveld 408576698