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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 15701022: [Sync] Add support for sync Persistence Errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 configure_status_ != DataTypeManager::PARTIAL_SUCCESS) { 1263 configure_status_ != DataTypeManager::PARTIAL_SUCCESS) {
1264 // Something catastrophic had happened. We should only have one 1264 // Something catastrophic had happened. We should only have one
1265 // error representing it. 1265 // error representing it.
1266 DCHECK_EQ(result.failed_data_types.size(), 1266 DCHECK_EQ(result.failed_data_types.size(),
1267 static_cast<unsigned int>(1)); 1267 static_cast<unsigned int>(1));
1268 syncer::SyncError error = result.failed_data_types.begin()->second; 1268 syncer::SyncError error = result.failed_data_types.begin()->second;
1269 DCHECK(error.IsSet()); 1269 DCHECK(error.IsSet());
1270 std::string message = 1270 std::string message =
1271 "Sync configuration failed with status " + 1271 "Sync configuration failed with status " +
1272 DataTypeManager::ConfigureStatusToString(configure_status_) + 1272 DataTypeManager::ConfigureStatusToString(configure_status_) +
1273 " during " + syncer::ModelTypeToString(error.type()) + 1273 " during " + syncer::ModelTypeToString(error.model_type()) +
1274 ": " + error.message(); 1274 ": " + error.message();
1275 LOG(ERROR) << "ProfileSyncService error: " << message; 1275 LOG(ERROR) << "ProfileSyncService error: " << message;
1276 OnInternalUnrecoverableError(error.location(), 1276 OnInternalUnrecoverableError(error.location(),
1277 message, 1277 message,
1278 true, 1278 true,
1279 ERROR_REASON_CONFIGURATION_FAILURE); 1279 ERROR_REASON_CONFIGURATION_FAILURE);
1280 return; 1280 return;
1281 } 1281 }
1282 1282
1283 // We should never get in a state where we have no encrypted datatypes 1283 // We should never get in a state where we have no encrypted datatypes
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 #if defined(ENABLE_MANAGED_USERS) 2065 #if defined(ENABLE_MANAGED_USERS)
2066 if (ManagedUserService::ProfileIsManaged(profile_)) { 2066 if (ManagedUserService::ProfileIsManaged(profile_)) {
2067 DCHECK_EQ(std::string(), signin_->GetAuthenticatedUsername()); 2067 DCHECK_EQ(std::string(), signin_->GetAuthenticatedUsername());
2068 return ManagedUserService::GetManagedUserPseudoEmail(); 2068 return ManagedUserService::GetManagedUserPseudoEmail();
2069 } 2069 }
2070 #endif 2070 #endif
2071 2071
2072 return signin_->GetAuthenticatedUsername(); 2072 return signin_->GetAuthenticatedUsername();
2073 } 2073 }
2074 2074
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698