Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(806)

Unified Diff: chrome/browser/chromeos/arc/arc_util.cc

Issue 2801173002: arc: Provide API to control Play Store state from autotests (Closed)
Patch Set: handle attempt to enabled policy disabled ARC, nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/autotest_private/autotest_private_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3c40a7c2f950b82644f66845c0aada8f88eee9d2..2f4e03645b8034aa9c2f9aced7bd0f26b119705e 100644
--- a/chrome/browser/chromeos/arc/arc_util.cc
+++ b/chrome/browser/chromeos/arc/arc_util.cc
@@ -115,6 +115,10 @@ bool IsArcPlayStoreEnabledPreferenceManagedForProfile(const Profile* profile) {
void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled) {
DCHECK(IsArcAllowedForProfile(profile));
if (IsArcPlayStoreEnabledPreferenceManagedForProfile(profile)) {
+ if (enabled && !IsArcPlayStoreEnabledForProfile(profile)) {
Luis Héctor Chávez 2017/04/07 16:09:05 IIUC (but I'm not entirely sure) this was added fo
khmel 2017/04/07 19:23:19 I remember I added this to enable restart ARC for
+ LOG(WARNING) << "Attempt to enable disabled by policy ARC.";
+ return;
+ }
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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/autotest_private/autotest_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698