summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 07:45:59 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 07:45:59 +0000
commitd3b98c88fa50c3b6bf4644570220cf93f8ca9bea (patch)
treee2fdf54cee2d8546526ed9aca724e9f957d0fb2b /chrome/browser/profile.cc
parent9473a8d2db6780ecac153c65ba8200cdb0eeb1bd (diff)
downloadchromium_src-d3b98c88fa50c3b6bf4644570220cf93f8ca9bea.zip
chromium_src-d3b98c88fa50c3b6bf4644570220cf93f8ca9bea.tar.gz
chromium_src-d3b98c88fa50c3b6bf4644570220cf93f8ca9bea.tar.bz2
Implement support for disabling sync through configuration management.
BUG=45316 TEST=Configure SyncDisabled policy and check the UI. Review URL: http://codereview.chromium.org/2905003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 89c50f4..570371b 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -277,6 +277,11 @@ URLRequestContextGetter* Profile::GetDefaultRequestContext() {
return default_request_context_;
}
+bool Profile::IsSyncAccessible() {
+ ProfileSyncService* syncService = GetProfileSyncService();
+ return syncService && !syncService->IsManaged();
+}
+
#if defined(OS_WIN)
#include "chrome/browser/password_manager/password_store_win.h"
#elif defined(OS_MACOSX)
@@ -1642,9 +1647,6 @@ TokenService* ProfileImpl::GetTokenService() {
}
ProfileSyncService* ProfileImpl::GetProfileSyncService() {
- if (!ProfileSyncService::IsSyncEnabled()) {
- return NULL;
- }
if (!sync_service_.get())
InitSyncService();
return sync_service_.get();