[Sync] Add ProfileSyncService::IsSyncAllowed().
commite8150cbd62e7c6b8289226e38e194cb8dbe229b3
authormaxbogue <maxbogue@chromium.org>
Thu, 11 Jun 2015 22:08:37 +0000 (11 15:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 11 Jun 2015 22:09:10 +0000 (11 22:09 +0000)
tree665f2d8643cedd7e66073ea6aadcccc5bc3a9e87
parent314fb90b02df6ab1d454351c581521f4e7ff14f0
[Sync] Add ProfileSyncService::IsSyncAllowed().

This is part of an effort to clean up sync's state interface. The new
IsSyncAllowed function is the canonical place to see whether there is
anything disallowing sync from starting up. This is conceptually
distinct from missing data (such as an auth token) required to start, or
from the user having turned sync off manually via RequestStop().

This CL also renames Profile::IsSyncAccessible to Profile::IsSyncAllowed
for consistent wording.

BUG=495192
TBR=finnur,mlerman,estade

Review URL: https://codereview.chromium.org/1173453003

Cr-Commit-Position: refs/heads/master@{#334049}
14 files changed:
chrome/browser/extensions/external_pref_loader.cc
chrome/browser/profiles/profile.cc
chrome/browser/profiles/profile.h
chrome/browser/signin/signin_ui_util.cc
chrome/browser/sync/profile_sync_service.cc
chrome/browser/sync/profile_sync_service.h
chrome/browser/sync/sync_startup_tracker.cc
chrome/browser/ui/sync/one_click_signin_sync_starter.cc
chrome/browser/ui/sync/sync_promo_ui.cc
chrome/browser/ui/webui/options/sync_setup_handler.cc
components/autofill/core/browser/options_util_unittest.cc
components/sync_driver/fake_sync_service.cc
components/sync_driver/fake_sync_service.h
components/sync_driver/sync_service.h