| 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 b9e6986c54d8648191e565c52f478c4d283041e0..93daf031664f19e2af0311b970f978b5acf57060 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
|
| @@ -342,9 +342,6 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) {
|
|
|
| Shutdown();
|
|
|
| - profile_ = profile;
|
| - SetState(State::STOPPED);
|
| -
|
| if (!IsAllowedForProfile(profile))
|
| return;
|
|
|
| @@ -354,6 +351,9 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) {
|
| return;
|
| }
|
|
|
| + profile_ = profile;
|
| + SetState(State::STOPPED);
|
| +
|
| PrefServiceSyncableFromProfile(profile_)->AddSyncedPrefObserver(
|
| prefs::kArcEnabled, this);
|
|
|
| @@ -637,6 +637,9 @@ bool ArcAuthService::IsArcManaged() const {
|
|
|
| bool ArcAuthService::IsArcEnabled() const {
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| + if (!IsAllowed())
|
| + return false;
|
| +
|
| DCHECK(profile_);
|
| return profile_->GetPrefs()->GetBoolean(prefs::kArcEnabled);
|
| }
|
|
|