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

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

Issue 10534075: [sync] Make SetSetupInProgress kick sync engine when needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First try at fixing unit_tests Created 8 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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 } 994 }
995 995
996 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { 996 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const {
997 return last_auth_error_; 997 return last_auth_error_;
998 } 998 }
999 999
1000 bool ProfileSyncService::FirstSetupInProgress() const { 1000 bool ProfileSyncService::FirstSetupInProgress() const {
1001 return !HasSyncSetupCompleted() && setup_in_progress_; 1001 return !HasSyncSetupCompleted() && setup_in_progress_;
1002 } 1002 }
1003 1003
1004 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) {
1005 setup_in_progress_ = setup_in_progress;
1006 if (!setup_in_progress) {
1007 if (sync_initialized()) {
1008 SetSyncSetupCompleted();
Andrew T Wilson (Slow) 2012/06/11 18:17:59 I'm somewhat leery about calling SetSyncSetupCompl
1009 OnUserChoseDatatypes(sync_prefs_.HasKeepEverythingSynced(),
1010 GetPreferredDataTypes());
1011 }
1012 }
1013 }
1014
1004 bool ProfileSyncService::sync_initialized() const { 1015 bool ProfileSyncService::sync_initialized() const {
1005 return backend_initialized_; 1016 return backend_initialized_;
1006 } 1017 }
1007 1018
1008 bool ProfileSyncService::waiting_for_auth() const { 1019 bool ProfileSyncService::waiting_for_auth() const {
1009 return is_auth_in_progress_; 1020 return is_auth_in_progress_;
1010 } 1021 }
1011 1022
1012 bool ProfileSyncService::unrecoverable_error_detected() const { 1023 bool ProfileSyncService::unrecoverable_error_detected() const {
1013 return unrecoverable_error_detected_; 1024 return unrecoverable_error_detected_;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1675 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1665 ProfileSyncService* old_this = this; 1676 ProfileSyncService* old_this = this;
1666 this->~ProfileSyncService(); 1677 this->~ProfileSyncService();
1667 new(old_this) ProfileSyncService( 1678 new(old_this) ProfileSyncService(
1668 new ProfileSyncComponentsFactoryImpl(profile, 1679 new ProfileSyncComponentsFactoryImpl(profile,
1669 CommandLine::ForCurrentProcess()), 1680 CommandLine::ForCurrentProcess()),
1670 profile, 1681 profile,
1671 signin, 1682 signin,
1672 behavior); 1683 behavior);
1673 } 1684 }
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