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

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

Issue 8332023: Add support for temporarily disabling sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed methods for stopping/starting sync and added google services username to sync prefs Created 9 years, 2 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 | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 4b48d05230bc0ced2537a1235d930aea6621eed8..ddabd2927ba4ee739a058e2505aa0b27df244aef 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -480,6 +480,12 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
SigninManager* signin() { return signin_.get(); }
const std::string& cros_user() const { return cros_user_; }
+ // Stops the sync backend and sets the flag for suppressing sync startup.
+ void StopAndSuppress();
+
+ // Resets the flag for suppressing sync startup and starts the sync backend.
+ void UnsuppressAndStart();
+
// Marks all currently registered types as "acknowledged" so we won't prompt
// the user about them any more.
void AcknowledgeSyncedTypes();
@@ -541,6 +547,10 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
friend class ProfileSyncServiceForWizardTest;
FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceTest, InitialState);
+ // Starts up sync if it is not suppressed and preconditions are met.
+ // Called from Initialize() and UnsuppressAndStart().
+ void TryStart();
+
// Called when we've determined that we don't need a passphrase (either
// because OnPassphraseAccepted() was called, or because we've gotten a
// OnPassphraseRequired() but no data types are enabled).
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698