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

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

Issue 10694013: Shade uninitialized about:sync fields (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix one more test error 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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 data_type_manager_.get() && 946 data_type_manager_.get() &&
947 data_type_manager_->state() != DataTypeManager::CONFIGURED) { 947 data_type_manager_->state() != DataTypeManager::CONFIGURED) {
948 return "Datatypes not fully initialized"; 948 return "Datatypes not fully initialized";
949 } else if (ShouldPushChanges()) { 949 } else if (ShouldPushChanges()) {
950 return "Sync service initialized"; 950 return "Sync service initialized";
951 } else { 951 } else {
952 return "Status unknown: Internal error?"; 952 return "Status unknown: Internal error?";
953 } 953 }
954 } 954 }
955 955
956 SyncBackendHost::Status ProfileSyncService::QueryDetailedSyncStatus() { 956 bool ProfileSyncService::QueryDetailedSyncStatus(
957 SyncBackendHost::Status* result) {
957 if (backend_.get() && backend_initialized_) { 958 if (backend_.get() && backend_initialized_) {
958 return backend_->GetDetailedStatus(); 959 *result = backend_->GetDetailedStatus();
960 return true;
959 } else { 961 } else {
960 SyncBackendHost::Status status; 962 SyncBackendHost::Status status;
961 status.sync_protocol_error = last_actionable_error_; 963 status.sync_protocol_error = last_actionable_error_;
962 return status; 964 *result = status;
965 return false;
963 } 966 }
964 } 967 }
965 968
966 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { 969 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const {
967 return last_auth_error_; 970 return last_auth_error_;
968 } 971 }
969 972
970 bool ProfileSyncService::FirstSetupInProgress() const { 973 bool ProfileSyncService::FirstSetupInProgress() const {
971 return !HasSyncSetupCompleted() && setup_in_progress_; 974 return !HasSyncSetupCompleted() && setup_in_progress_;
972 } 975 }
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1726 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1724 ProfileSyncService* old_this = this; 1727 ProfileSyncService* old_this = this;
1725 this->~ProfileSyncService(); 1728 this->~ProfileSyncService();
1726 new(old_this) ProfileSyncService( 1729 new(old_this) ProfileSyncService(
1727 new ProfileSyncComponentsFactoryImpl(profile, 1730 new ProfileSyncComponentsFactoryImpl(profile,
1728 CommandLine::ForCurrentProcess()), 1731 CommandLine::ForCurrentProcess()),
1729 profile, 1732 profile,
1730 signin, 1733 signin,
1731 behavior); 1734 behavior);
1732 } 1735 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698