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

Unified Diff: chrome/browser/profile.cc

Issue 2905003: Implement support for disabling sync through configuration management. (Closed)
Patch Set: Fix PrefsControllerTest on MAC. Created 10 years, 5 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 | « chrome/browser/profile.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 318969488152e833bbb297d13cd179494bba6ed1..ecf606986327f4ec7c8a5f80294cdf282c14da8a 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -276,6 +276,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)
@@ -1630,9 +1635,6 @@ void ProfileImpl::StopCreateSessionServiceTimer() {
}
ProfileSyncService* ProfileImpl::GetProfileSyncService() {
- if (!ProfileSyncService::IsSyncEnabled()) {
- return NULL;
- }
if (!sync_service_.get())
InitSyncService();
return sync_service_.get();
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698