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

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

Issue 10696107: sync: Track validity of about:sync fields (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 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 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 data_type_manager_.get() && 963 data_type_manager_.get() &&
964 data_type_manager_->state() != DataTypeManager::CONFIGURED) { 964 data_type_manager_->state() != DataTypeManager::CONFIGURED) {
965 return "Datatypes not fully initialized"; 965 return "Datatypes not fully initialized";
966 } else if (ShouldPushChanges()) { 966 } else if (ShouldPushChanges()) {
967 return "Sync service initialized"; 967 return "Sync service initialized";
968 } else { 968 } else {
969 return "Status unknown: Internal error?"; 969 return "Status unknown: Internal error?";
970 } 970 }
971 } 971 }
972 972
973 SyncBackendHost::Status ProfileSyncService::QueryDetailedSyncStatus() { 973 bool ProfileSyncService::QueryDetailedSyncStatus(
974 SyncBackendHost::Status* result) {
974 if (backend_.get() && backend_initialized_) { 975 if (backend_.get() && backend_initialized_) {
975 return backend_->GetDetailedStatus(); 976 *result = backend_->GetDetailedStatus();
977 return true;
976 } else { 978 } else {
977 SyncBackendHost::Status status; 979 SyncBackendHost::Status status;
978 status.sync_protocol_error = last_actionable_error_; 980 status.sync_protocol_error = last_actionable_error_;
979 return status; 981 *result = status;
982 return false;
980 } 983 }
981 } 984 }
982 985
983 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { 986 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const {
984 return last_auth_error_; 987 return last_auth_error_;
985 } 988 }
986 989
987 bool ProfileSyncService::FirstSetupInProgress() const { 990 bool ProfileSyncService::FirstSetupInProgress() const {
988 return !HasSyncSetupCompleted() && setup_in_progress_; 991 return !HasSyncSetupCompleted() && setup_in_progress_;
989 } 992 }
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1763 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1761 ProfileSyncService* old_this = this; 1764 ProfileSyncService* old_this = this;
1762 this->~ProfileSyncService(); 1765 this->~ProfileSyncService();
1763 new(old_this) ProfileSyncService( 1766 new(old_this) ProfileSyncService(
1764 new ProfileSyncComponentsFactoryImpl(profile, 1767 new ProfileSyncComponentsFactoryImpl(profile,
1765 CommandLine::ForCurrentProcess()), 1768 CommandLine::ForCurrentProcess()),
1766 profile, 1769 profile,
1767 signin, 1770 signin,
1768 behavior); 1771 behavior);
1769 } 1772 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698