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

Unified Diff: chrome/browser/profiles/profile.cc

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 7 years, 7 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile.cc
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 9c3b711324c2c066dee4909998b4984c3ea08b02..6206bd7eaf67df36361da0b2b4b1af92f58d7a0b 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -10,6 +10,7 @@
#include "build/build_config.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/sync_prefs.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
@@ -171,6 +172,11 @@ bool Profile::IsNewProfile() {
}
bool Profile::IsSyncAccessible() {
+ if (ProfileSyncServiceFactory::HasProfileSyncService(this))
+ return !ProfileSyncServiceFactory::GetForProfile(this)->IsManaged();
+
+ // No ProfileSyncService created yet - we don't want to create one, so just
+ // infer the accessible state by looking at prefs/command line flags.
browser_sync::SyncPrefs prefs(GetPrefs());
return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged();
}
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698