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

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

Issue 1575153004: [Sync] Simplify sync startup behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setup
Patch Set: Rebase. Created 4 years, 9 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.h
diff --git a/components/browser_sync/browser/profile_sync_service.h b/components/browser_sync/browser/profile_sync_service.h
index df981bc3e78339f174984afa2b44f2f65a1bddea..bd48e8738f55d00be9560698c9058eb8a2819d94 100644
--- a/components/browser_sync/browser/profile_sync_service.h
+++ b/components/browser_sync/browser/profile_sync_service.h
@@ -165,14 +165,8 @@ class EncryptedData;
// up sync at least once on their account. SetSetupInProgress(true) should be
// called while the user is actively configuring their account, and then
// SetSetupInProgress(false) should be called when configuration is complete.
-// When SetFirstSetupComplete() == false, but SetSetupInProgress(true) has
-// been called, then the sync engine knows not to download any user data.
-//
-// When initial sync is complete, the UI code should call
-// SetFirstSetupComplete() followed by SetSetupInProgress(false) - this will
-// tell the sync engine that setup is completed and it can begin downloading
-// data from the sync server.
-//
+// Once both these conditions have been met, CanConfigureDataTypes() will
+// return true and datatype configuration can begin.
class ProfileSyncService : public sync_driver::SyncService,
public sync_driver::SyncFrontend,
public sync_driver::SyncPrefObserver,
@@ -508,9 +502,6 @@ class ProfileSyncService : public sync_driver::SyncService,
SigninManagerBase* signin() const;
- // Used by tests.
- bool auto_start_enabled() const;
-
SyncErrorController* sync_error_controller() {
return sync_error_controller_.get();
}
@@ -782,6 +773,9 @@ class ProfileSyncService : public sync_driver::SyncService,
// Restarts sync clearing directory in the process.
void OnClearServerDataDone();
+ // True if setup has been completed at least once and is not in progress.
+ bool CanConfigureDataTypes() const;
+
// This profile's SyncClient, which abstracts away non-Sync dependencies and
// the Sync API component factory.
scoped_ptr<sync_driver::SyncClient> sync_client_;
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | components/browser_sync/browser/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698