| Index: chrome/browser/chromeos/arc/arc_util.cc
|
| diff --git a/chrome/browser/chromeos/arc/arc_util.cc b/chrome/browser/chromeos/arc/arc_util.cc
|
| index f91cebc8f01f4e6b26317ed5791c74b573cecdc8..cbb661960109456a7fff386870abbbd5825f6198 100644
|
| --- a/chrome/browser/chromeos/arc/arc_util.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_util.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/chromeos/arc/arc_util.h"
|
|
|
| #include "base/logging.h"
|
| +#include "chrome/browser/chromeos/arc/arc_session_manager.h"
|
| #include "chrome/browser/chromeos/login/user_flow.h"
|
| #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
|
| #include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| @@ -114,8 +115,15 @@ bool IsArcPlayStoreEnabledPreferenceManagedForProfile(const Profile* profile) {
|
| void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled) {
|
| DCHECK(IsArcAllowedForProfile(profile));
|
| if (IsArcPlayStoreEnabledPreferenceManagedForProfile(profile)) {
|
| - VLOG(1) << "Do nothing, since the Google-Play-Store-enabled pref is "
|
| - << "managed.";
|
| + VLOG(1) << "Google-Play-Store-enabled pref is managed. Request to "
|
| + << (enabled ? "enable" : "disable") << " Play Store is not stored";
|
| + // Need update ARC session manager manually for managed case in order to
|
| + // keep its state up to date, otherwise it may stuck with enabling
|
| + // request.
|
| + if (enabled)
|
| + ArcSessionManager::Get()->RequestEnable();
|
| + else
|
| + ArcSessionManager::Get()->RequestDisable();
|
| return;
|
| }
|
| profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, enabled);
|
|
|