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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 2847072: Green Tree Tactical Force: Revert skrul's bad commits (probably a git-cl bug). (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index ce3d7e4ae36f2e8a899b8584eb43ea1466916545..2b9098b50c5cfaeb643ca2ad324593fdc61e10fa 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) {
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698