Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_auth_service.cc |
| diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc |
| index 2f68cd39a8b671c0e9ea76adffb5520cd2d9f717..71d44e1eb97878a06ba3146d357ca8b3ba490299 100644 |
| --- a/chrome/browser/chromeos/arc/arc_auth_service.cc |
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc |
| @@ -341,9 +341,6 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) { |
| Shutdown(); |
| - profile_ = profile; |
|
khmel
2016/07/14 23:17:10
Actually this incorrect. It was changed while ago
|
| - SetState(State::STOPPED); |
| - |
| if (!IsAllowedForProfile(profile)) |
| return; |
| @@ -353,6 +350,9 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) { |
| return; |
| } |
| + profile_ = profile; |
| + SetState(State::STOPPED); |
| + |
| PrefServiceSyncableFromProfile(profile_)->AddSyncedPrefObserver( |
| prefs::kArcEnabled, this); |
| @@ -636,6 +636,9 @@ bool ArcAuthService::IsArcManaged() const { |
| bool ArcAuthService::IsArcEnabled() const { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| + if (!IsAllowed()) |
|
khmel
2016/07/14 23:17:11
There are several calls to IsArcEnabled without pr
xiyuan
2016/07/15 17:12:52
Makes sense.
|
| + return false; |
| + |
| DCHECK(profile_); |
| return profile_->GetPrefs()->GetBoolean(prefs::kArcEnabled); |
| } |