Chromium Code Reviews| Index: chrome/browser/profiles/profile.cc |
| diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc |
| index 65ac81bd893736a0a77146bb53e61eb02f41b803..f4a7b14795659cef407acc4a96da7f8d278334ca 100644 |
| --- a/chrome/browser/profiles/profile.cc |
| +++ b/chrome/browser/profiles/profile.cc |
| @@ -211,9 +211,8 @@ bool Profile::IsNewProfile() { |
| } |
| bool Profile::IsSyncAllowed() { |
| - if (ProfileSyncServiceFactory::HasProfileSyncService(this)) { |
| + if (ProfileSyncServiceFactory::HasProfileSyncService(this)) |
| return ProfileSyncServiceFactory::GetForProfile(this)->IsSyncAllowed(); |
| - } |
| // No ProfileSyncService created yet - we don't want to create one, so just |
| // infer the accessible state by looking at prefs/command line flags. |
| @@ -222,6 +221,16 @@ bool Profile::IsSyncAllowed() { |
| !prefs.IsManaged(); |
| } |
| +bool Profile::IsLocalSyncEnabled() { |
|
Nicolas Zea
2016/12/15 00:37:28
Do we really need this exposed here? Can we just h
pastarmovj
2016/12/16 17:04:48
As suggested reverted this change.
|
| + if (ProfileSyncServiceFactory::HasProfileSyncService(this)) |
| + return ProfileSyncServiceFactory::GetForProfile(this)->IsLocalSyncEnabled(); |
| + |
| + // No ProfileSyncService created yet - we don't want to create one, so just |
| + // infer the accessible state by looking at prefs/command line flags. |
| + syncer::SyncPrefs prefs(GetPrefs()); |
| + return prefs.IsLocalSyncEnabled(); |
| +} |
| + |
| void Profile::MaybeSendDestroyedNotification() { |
| if (!sent_destroyed_notification_) { |
| sent_destroyed_notification_ = true; |