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

Unified Diff: components/sync_driver/startup_controller.h

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: Android fix attempt 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/sync_driver/startup_controller.h
diff --git a/components/sync_driver/startup_controller.h b/components/sync_driver/startup_controller.h
index 9ebb9d56834f7a9e6d3cebfbe2bae50cfc7f03ad..350f9931aafa7b4f1d6ad0c95266aac50353fd86 100644
--- a/components/sync_driver/startup_controller.h
+++ b/components/sync_driver/startup_controller.h
@@ -31,6 +31,10 @@ class StartupController {
// the backend was started.
bool TryStart();
+ // Same as TryStart() above, but bypasses deferred startup and the first setup
+ // complete check.
+ bool TryStartImmediately();
+
// Called when a datatype (SyncableService) has a need for sync to start
// ASAP, presumably because a local change event has occurred but we're
// still in deferred start mode, meaning the SyncableService hasn't been
@@ -67,6 +71,10 @@ class StartupController {
// Records time spent in deferred state with UMA histograms.
void RecordTimeDeferred();
+ // If true, will bypass the FirstSetupComplete check when triggering sync
+ // startup.
+ bool bypass_setup_complete_;
+
// True if we should start sync ASAP because either a SyncableService has
// requested it, or we're done waiting for a sign and decided to go ahead.
bool received_start_request_;
« no previous file with comments | « components/browser_sync/browser/profile_sync_service_unittest.cc ('k') | components/sync_driver/startup_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698