Index: trunk/src/chrome/browser/sync/profile_sync_service.cc |
=================================================================== |
--- trunk/src/chrome/browser/sync/profile_sync_service.cc (revision 289114) |
+++ trunk/src/chrome/browser/sync/profile_sync_service.cc (working copy) |
@@ -1470,7 +1470,8 @@ |
configure_status_ = result.status; |
if (backend_mode_ != SYNC) { |
- if (configure_status_ == DataTypeManager::OK) { |
+ if (configure_status_ == DataTypeManager::OK || |
+ configure_status_ == DataTypeManager::PARTIAL_SUCCESS) { |
StartSyncingWithServer(); |
} else if (!expect_sync_configuration_aborted_) { |
DVLOG(1) << "Backup/rollback backend failed to configure."; |
@@ -1481,7 +1482,8 @@ |
} |
if (!sync_configure_start_time_.is_null()) { |
- if (result.status == DataTypeManager::OK) { |
+ if (result.status == DataTypeManager::OK || |
+ result.status == DataTypeManager::PARTIAL_SUCCESS) { |
base::Time sync_configure_stop_time = base::Time::Now(); |
base::TimeDelta delta = sync_configure_stop_time - |
sync_configure_start_time_; |
@@ -1505,7 +1507,8 @@ |
// The possible status values: |
// ABORT - Configuration was aborted. This is not an error, if |
// initiated by user. |
- // OK - Some or all types succeeded. |
+ // OK - Everything succeeded. |
+ // PARTIAL_SUCCESS - Some datatypes failed to start. |
// Everything else is an UnrecoverableError. So treat it as such. |
// First handle the abort case. |
@@ -1517,18 +1520,18 @@ |
} |
// Handle unrecoverable error. |
- if (configure_status_ != DataTypeManager::OK) { |
+ if (configure_status_ != DataTypeManager::OK && |
+ configure_status_ != DataTypeManager::PARTIAL_SUCCESS) { |
// Something catastrophic had happened. We should only have one |
// error representing it. |
- syncer::SyncError error = |
- failed_data_types_handler_.GetUnrecoverableError(); |
+ DCHECK_EQ(result.failed_data_types.size(), |
+ static_cast<unsigned int>(1)); |
+ syncer::SyncError error = result.failed_data_types.begin()->second; |
DCHECK(error.IsSet()); |
std::string message = |
"Sync configuration failed with status " + |
DataTypeManager::ConfigureStatusToString(configure_status_) + |
- " caused by " + |
- syncer::ModelTypeSetToString( |
- failed_data_types_handler_.GetUnrecoverableErrorTypes()) + |
+ " during " + syncer::ModelTypeToString(error.model_type()) + |
": " + error.message(); |
LOG(ERROR) << "ProfileSyncService error: " << message; |
OnInternalUnrecoverableError(error.location(), |