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 0781a0124631387d85c13cfb7c5d9cf4099043be..fc2082532984647f5fba446fcc7aff130bf89d45 100644 |
| --- a/chrome/browser/chromeos/arc/arc_auth_service.cc |
| +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc |
| @@ -228,10 +228,8 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) { |
| OnOptInPreferenceChanged(); |
| } else { |
| UpdateEnabledStateUMA(false); |
| - if (!disable_ui_for_testing && profile_->IsNewProfile()) { |
| - PrefServiceSyncableFromProfile(profile_)->AddObserver(this); |
| - OnIsSyncingChanged(); |
| - } |
| + PrefServiceSyncableFromProfile(profile_)->AddObserver(this); |
|
khmel
2016/03/31 22:19:21
In one of the recent CLs I changed observer scheme
|
| + OnIsSyncingChanged(); |
| } |
| } else { |
| auth_code_.clear(); |
| @@ -246,8 +244,14 @@ void ArcAuthService::OnIsSyncingChanged() { |
| return; |
| pref_service_syncable->RemoveObserver(this); |
| - if (!profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled)) |
| + |
| + if (profile_->GetPrefs()->GetBoolean(prefs::kArcEnabled)) |
| + OnOptInPreferenceChanged(); |
| + |
| + if (!disable_ui_for_testing && profile_->IsNewProfile() && |
|
xiyuan
2016/03/31 22:32:44
nit: profile_->IsNewProfile() might not be necessa
khmel
2016/03/31 22:47:34
I think it might be required.
For example:
User st
xiyuan
2016/03/31 22:50:50
Okay. That sounds like a valid case.
|
| + !profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled)) { |
| arc::ArcAuthNotification::Show(); |
| + } |
| } |
| void ArcAuthService::Shutdown() { |