summaryrefslogtreecommitdiffstats
path: root/components/sync_driver/sync_service.h
diff options
context:
space:
mode:
authormaxbogue <maxbogue@chromium.org>2015-06-15 19:59:58 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-16 03:00:36 +0000
commit96b7d277ef548f5f3d5f050efe229a719c2389fb (patch)
treecb1e3f1ffe9f595db3958512da2ce1b10e8f185d /components/sync_driver/sync_service.h
parent94585c59bd8ca7c0aed789dc1e893b125aca8a3d (diff)
downloadchromium_src-96b7d277ef548f5f3d5f050efe229a719c2389fb.zip
chromium_src-96b7d277ef548f5f3d5f050efe229a719c2389fb.tar.gz
chromium_src-96b7d277ef548f5f3d5f050efe229a719c2389fb.tar.bz2
[Sync] Rename SyncEnabledAndLoggedIn() to CanStartSync().
This is part of an effort to clean up sync's state interface. CanStartSync more accurately represents the conceptual implication of the conditions that the method checks. Note that at present, this does not map perfectly to what is actually checked when sync tries to start, but that will happen in an upcoming change. BUG=495192 TBR=sdefresne,pkasting Review URL: https://codereview.chromium.org/1175243009 Cr-Commit-Position: refs/heads/master@{#334545}
Diffstat (limited to 'components/sync_driver/sync_service.h')
-rw-r--r--components/sync_driver/sync_service.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/sync_driver/sync_service.h b/components/sync_driver/sync_service.h
index 476f1de..1c869a3 100644
--- a/components/sync_driver/sync_service.h
+++ b/components/sync_driver/sync_service.h
@@ -67,15 +67,11 @@ class SyncService : public sync_driver::DataTypeEncryptionHandler {
// TODO(sync): The methods below were pulled from ProfileSyncService, and
// should be evaluated to see if they should stay.
- // Returns true if sync is enabled/not suppressed and the user is logged in.
+ // Returns true if sync is allowed, requested, and the user is logged in.
// (being logged in does not mean that tokens are available - tokens may
// be missing because they have not loaded yet, or because they were deleted
// due to http://crbug.com/121755).
- // Virtual to enable mocking in tests.
- // TODO(tim): Remove this? Nothing in ProfileSyncService uses it, and outside
- // callers use a seemingly arbitrary / redundant / bug prone combination of
- // this method, IsSyncAllowed, and others.
- virtual bool IsSyncEnabledAndLoggedIn() = 0;
+ virtual bool CanSyncStart() const = 0;
// Disables sync for user. Use ShowLoginDialog to enable.
virtual void DisableForUser() = 0;