| 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 dae02bfa2427efbb74604d8a8b795ce5b103eda7..502097c461b8453ac834de5cb3f041e454f95e69 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| @@ -348,9 +348,6 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) {
|
|
|
| Shutdown();
|
|
|
| - profile_ = profile;
|
| - SetState(State::STOPPED);
|
| -
|
| if (!IsAllowedForProfile(profile))
|
| return;
|
|
|
| @@ -360,6 +357,9 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) {
|
| return;
|
| }
|
|
|
| + profile_ = profile;
|
| + SetState(State::STOPPED);
|
| +
|
| PrefServiceSyncableFromProfile(profile_)->AddSyncedPrefObserver(
|
| prefs::kArcEnabled, this);
|
|
|
| @@ -641,6 +641,9 @@ bool ArcAuthService::IsArcManaged() const {
|
|
|
| bool ArcAuthService::IsArcEnabled() const {
|
| DCHECK(thread_checker.Get().CalledOnValidThread());
|
| + if (!IsAllowed())
|
| + return false;
|
| +
|
| DCHECK(profile_);
|
| return profile_->GetPrefs()->GetBoolean(prefs::kArcEnabled);
|
| }
|
|
|