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

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

Issue 7497014: Revert 94128 - [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- chrome/browser/sync/profile_sync_service.cc (revision 94142)
+++ chrome/browser/sync/profile_sync_service.cc (working copy)
@@ -1263,12 +1263,13 @@
break;
}
case chrome::NOTIFICATION_SYNC_CONFIGURE_DONE: {
- DataTypeManager::ConfigureResult* result =
- Details<DataTypeManager::ConfigureResult>(details).ptr();
+ DataTypeManager::ConfigureResultWithErrorLocation* result_with_location =
+ Details<DataTypeManager::ConfigureResultWithErrorLocation>(
+ details).ptr();
- DataTypeManager::ConfigureStatus status = result->status;
- VLOG(1) << "PSS SYNC_CONFIGURE_DONE called with status: " << status;
- if (status == DataTypeManager::ABORTED &&
+ DataTypeManager::ConfigureResult result = result_with_location->result;
+ VLOG(1) << "PSS SYNC_CONFIGURE_DONE called with result: " << result;
+ if (result == DataTypeManager::ABORTED &&
expect_sync_configuration_aborted_) {
VLOG(0) << "ProfileSyncService::Observe Sync Configure aborted";
expect_sync_configuration_aborted_ = false;
@@ -1276,13 +1277,11 @@
}
// Clear out the gaia password if it is already there.
gaia_password_ = std::string();
- if (status != DataTypeManager::OK) {
+ if (result != DataTypeManager::OK) {
VLOG(0) << "ProfileSyncService::Observe: Unrecoverable error detected";
- std::string message =
- "Sync Configuration failed while configuring " +
- syncable::ModelTypeSetToString(result->failed_types) +
- ": " + DataTypeManager::ConfigureStatusToString(status);
- OnUnrecoverableError(result->location, message);
+ std::string message = StringPrintf("Sync Configuration failed with %d",
+ result);
+ OnUnrecoverableError(*(result_with_location->location), message);
cached_passphrase_ = CachedPassphrase();
return;
}
« no previous file with comments | « chrome/browser/sync/glue/typed_url_model_associator.cc ('k') | chrome/browser/sync/profile_sync_service_bookmark_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698