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

Unified Diff: components/arc/arc_util.h

Issue 2885933003: arc: Consolidate IsArcAllowedForUser logic (Closed)
Patch Set: add comment for arc kiosk user check 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
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/arc_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_util.h
diff --git a/components/arc/arc_util.h b/components/arc/arc_util.h
index 2e5ddd37e5a58a793d996a62c06a0fc3d4aea272..d1423e142b6aba672cf2ef2ce977c1a681d34e28 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);
+
// Checks if opt-in verification was disabled by switch in command line.
// In most cases, it is disabled for testing purpose.
bool IsArcOptInVerificationDisabled();
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/arc_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698