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

Unified Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 2159453002: [Sync] Don't start up sync when FirstSetupCompleted is false and no setup in progress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 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
Index: components/browser_sync/browser/profile_sync_service.cc
diff --git a/components/browser_sync/browser/profile_sync_service.cc b/components/browser_sync/browser/profile_sync_service.cc
index 7a57b2f5654bbf4a3e7eee4e2bc37a17e7e9eb21..ee8e817232425061079e7f909ec66b48236c0dd7 100644
--- a/components/browser_sync/browser/profile_sync_service.cc
+++ b/components/browser_sync/browser/profile_sync_service.cc
@@ -381,7 +381,14 @@ void ProfileSyncService::Initialize() {
base::Bind(&ProfileSyncService::OnMemoryPressure,
sync_enabled_weak_factory_.GetWeakPtr())));
startup_controller_->Reset(GetRegisteredDataTypes());
- startup_controller_->TryStart();
+
+ // Auto-start means means the first time the profile starts up, sync should
+ // start up immediately.
+ if (start_behavior_ == AUTO_START && !IsFirstSetupComplete()) {
+ startup_controller_->TryStartImmediately();
+ } else {
+ startup_controller_->TryStart();
+ }
}
void ProfileSyncService::StartSyncingWithServer() {

Powered by Google App Engine
This is Rietveld 408576698