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

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

Issue 2702723002: Extract kArcEnabled preference from ArcSessionManager part 1. (Closed)
Patch Set: Created 3 years, 10 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
Index: chrome/browser/chromeos/arc/arc_util.h
diff --git a/chrome/browser/chromeos/arc/arc_util.h b/chrome/browser/chromeos/arc/arc_util.h
index 9f7422dfade687d811df6f155df68913cfa60a19..c430150a76573fa676fcb7bc6096e778204491e0 100644
--- a/chrome/browser/chromeos/arc/arc_util.h
+++ b/chrome/browser/chromeos/arc/arc_util.h
@@ -31,6 +31,31 @@ bool IsArcAllowedForProfile(const Profile* profile);
// case.
void DisallowArcForTesting();
+// Returns whether the user has opted in (or is opting in now) to use Google
+// Play Store on ARC.
+// This is almost equivalent to the value of "arc.enabled" preference. However,
+// in addition, if ARC is not allowed for the given |profile|, then returns
+// false.
+// Note: For historical reason, the preference name is not matched with the
+// actual meaning.
+bool IsArcPlayStoreEnabledForProfile(const Profile* profile);
+
+// Returns whether the preference "arc.enabled" is managed or not.
+// It is requirement for a caller to ensure ARC is allowed for the user of
+// the given |profile|.
+bool IsArcPlayStoreEnabledPreferenceManagedForProfile(const Profile* profile);
+
+// Enables or disables Google Play Store on ARC. Currently, it is tied to
+// ARC enabled state, too, so this also should trigger to enable or disable
+// whole ARC system.
+// If the preference is managed, then no-op.
+// It is requirement for a caller to ensure ARC is allowed for the user of
+// the given |profile|.
+// TODO(hidehiko): De-couple the concept to enable ARC system and opt-in
+// to use Google Play Store. Note that there is a plan to use ARC without
+// Google Play Store, then ARC can run without opt-in.
+void SetArcPlayStoreEnabledForProfile(Profile* profile, bool enabled);
+
} // namespace arc
#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698