summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 21:23:40 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 21:23:40 +0000
commit26c23b531a38bf0174442edc9289c522fc406751 (patch)
tree766c341c60718c407df64f8e80ffc7677f5b6837 /chrome/browser/sync
parentf98391c1fac48105c5b503d18dee5c83a65aee60 (diff)
downloadchromium_src-26c23b531a38bf0174442edc9289c522fc406751.zip
chromium_src-26c23b531a38bf0174442edc9289c522fc406751.tar.gz
chromium_src-26c23b531a38bf0174442edc9289c522fc406751.tar.bz2
Green Tree Tactical Force: Revert skrul's bad commits (probably a git-cl bug).
TBR=skrul Review URL: http://codereview.chromium.org/2847072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc17
-rw-r--r--chrome/browser/sync/profile_sync_service.h5
2 files changed, 7 insertions, 15 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index ce3d7e4..2b9098b 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -144,8 +144,7 @@ void ProfileSyncService::Initialize() {
DisableForUser(); // Clean up in case of previous crash / setup abort.
// Automatically start sync in Chromium OS.
- if (bootstrap_sync_authentication_ &&
- !profile_->GetPrefs()->GetBoolean(prefs::kSyncSuppressStart)) {
+ if (bootstrap_sync_authentication_) {
// If the LSID is empty, we're in a CrOS UI test that is not testing sync
// behavior, so we don't want the sync service to start.
if (profile()->GetTokenService() &&
@@ -217,7 +216,6 @@ void ProfileSyncService::RegisterPreferences() {
return;
pref_service->RegisterInt64Pref(prefs::kSyncLastSyncedTime, 0);
pref_service->RegisterBooleanPref(prefs::kSyncHasSetupCompleted, false);
- pref_service->RegisterBooleanPref(prefs::kSyncSuppressStart, false);
// If you've never synced before, or if you're using Chrome OS, all datatypes
// are on by default.
@@ -368,7 +366,6 @@ bool ProfileSyncService::HasSyncSetupCompleted() const {
void ProfileSyncService::SetSyncSetupCompleted() {
PrefService* prefs = profile()->GetPrefs();
prefs->SetBoolean(prefs::kSyncHasSetupCompleted, true);
- prefs->SetBoolean(prefs::kSyncSuppressStart, false);
prefs->ScheduleSavePersistentPrefs();
}
@@ -451,11 +448,7 @@ void ProfileSyncService::OnBackendInitialized() {
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
if (bootstrap_sync_authentication_) {
- if (profile_->GetPrefs()->GetBoolean(prefs::kSyncSuppressStart)) {
- ShowChooseDataTypes(NULL);
- } else {
- SetSyncSetupCompleted();
- }
+ SetSyncSetupCompleted();
}
if (HasSyncSetupCompleted())
@@ -502,7 +495,7 @@ void ProfileSyncService::OnStopSyncingPermanently() {
wizard_.Step(SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR);
expect_sync_configuration_aborted_ = true;
}
- profile_->GetPrefs()->SetBoolean(prefs::kSyncSuppressStart, true);
+
DisableForUser();
}
@@ -550,10 +543,6 @@ SyncBackendHost::Status ProfileSyncService::QueryDetailedSyncStatus() {
}
}
-bool ProfileSyncService::SetupInProgress() const {
- return !HasSyncSetupCompleted() && WizardIsVisible();
-}
-
std::wstring ProfileSyncService::BuildSyncStatusSummaryText(
const sync_api::SyncManager::Status::Summary& summary) {
switch (summary) {
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 7acb034..9615124 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -175,7 +175,10 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// progress, the sync system is already authenticated, or some error
// occurred preventing the action. We make it the duty of ProfileSyncService
// to open the dialog to easily ensure only one is ever showing.
- bool SetupInProgress() const;
+ bool SetupInProgress() const {
+ return !HasSyncSetupCompleted() &&
+ (WizardIsVisible() || bootstrap_sync_authentication_);
+ }
bool WizardIsVisible() const {
return wizard_.IsVisible();
}