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

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

Issue 10829029: sync: don't display one-click if setup is in progress (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test 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
« no previous file with comments | « no previous file | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 985
986 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { 986 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const {
987 return last_auth_error_; 987 return last_auth_error_;
988 } 988 }
989 989
990 bool ProfileSyncService::FirstSetupInProgress() const { 990 bool ProfileSyncService::FirstSetupInProgress() const {
991 return !HasSyncSetupCompleted() && setup_in_progress_; 991 return !HasSyncSetupCompleted() && setup_in_progress_;
992 } 992 }
993 993
994 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) { 994 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) {
995 bool was_in_progress = setup_in_progress_;
995 setup_in_progress_ = setup_in_progress; 996 setup_in_progress_ = setup_in_progress;
996 if (!setup_in_progress) { 997 if (!setup_in_progress && was_in_progress) {
997 if (sync_initialized()) { 998 if (sync_initialized()) {
998 ReconfigureDatatypeManager(); 999 ReconfigureDatatypeManager();
999 } 1000 }
1000 } 1001 }
1001 } 1002 }
1002 1003
1003 bool ProfileSyncService::sync_initialized() const { 1004 bool ProfileSyncService::sync_initialized() const {
1004 return backend_initialized_; 1005 return backend_initialized_;
1005 } 1006 }
1006 1007
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1764 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1764 ProfileSyncService* old_this = this; 1765 ProfileSyncService* old_this = this;
1765 this->~ProfileSyncService(); 1766 this->~ProfileSyncService();
1766 new(old_this) ProfileSyncService( 1767 new(old_this) ProfileSyncService(
1767 new ProfileSyncComponentsFactoryImpl(profile, 1768 new ProfileSyncComponentsFactoryImpl(profile,
1768 CommandLine::ForCurrentProcess()), 1769 CommandLine::ForCurrentProcess()),
1769 profile, 1770 profile,
1770 signin, 1771 signin,
1771 behavior); 1772 behavior);
1772 } 1773 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698