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

Unified Diff: components/arc/arc_util.h

Issue 2885933003: arc: Consolidate IsArcAllowedForUser logic (Closed)
Patch Set: rebase Created 3 years, 7 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: components/arc/arc_util.h
diff --git a/components/arc/arc_util.h b/components/arc/arc_util.h
index aa63bcbc324cc0382b03a51e1d5eb458b8fa9625..c5a79c6e0ef1a91e557ce98ca28fd26958b4e433 100644
--- a/components/arc/arc_util.h
+++ b/components/arc/arc_util.h
@@ -17,6 +17,10 @@ namespace base {
class CommandLine;
} // namespace base
+namespace user_manager {
+class User;
+} // namespace user_manager
+
namespace arc {
// Returns true if ARC is installed and the current device is officially
@@ -62,6 +66,13 @@ void SetArcAvailableCommandLineForTesting(base::CommandLine* command_line);
// should also return true in that case.
bool IsArcKioskMode();
+// Returns true if ARC is allowed for the given user. Note this should not be
+// used as a signal of whether ARC is allowed alone because it only considers
+// user meta data. e.g. a user could be allowed for ARC but if the user signs in
+// as a secondary user or signs in to create a supervised user, ARC should be
+// disabled for such cases.
+bool IsArcAllowedForUser(const user_manager::User* user);
+
// Returns true if it is allowed to use ARC with Active Directory managed
// devices.
bool IsArcAllowedForActiveDirectoryUsers();

Powered by Google App Engine
This is Rietveld 408576698