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

Unified Diff: components/arc/arc_util.cc

Issue 2725113002: Enable ARC kiosk mode always when ARC is available (Closed)
Patch Set: feedback2 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
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | components/arc/arc_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_util.cc
diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc
index bb876f03485aa5822295250110e3e4b6bbab4f29..339f6cb234684131dd3a15a98d92739d117084fd 100644
--- a/components/arc/arc_util.cc
+++ b/components/arc/arc_util.cc
@@ -24,8 +24,6 @@ const base::Feature kEnableArcFeature{"EnableARC",
// Possible values for --arc-availability flag.
constexpr char kAvailabilityNone[] = "none";
constexpr char kAvailabilityInstalled[] = "installed";
-constexpr char kAvailabilityInstalledOnlyKioskSupported[] =
- "installed-only-kiosk-supported";
constexpr char kAvailabilityOfficiallySupported[] = "officially-supported";
constexpr char kAvailabilityOfficiallySupportedWithActiveDirectory[] =
"officially-supported-with-active-directory";
@@ -40,14 +38,12 @@ bool IsArcAvailable() {
chromeos::switches::kArcAvailability);
DCHECK(value == kAvailabilityNone ||
value == kAvailabilityInstalled ||
- value == kAvailabilityInstalledOnlyKioskSupported ||
value == kAvailabilityOfficiallySupported ||
value == kAvailabilityOfficiallySupportedWithActiveDirectory)
<< "Unknown flag value: " << value;
return value == kAvailabilityOfficiallySupported ||
value == kAvailabilityOfficiallySupportedWithActiveDirectory ||
- ((value == kAvailabilityInstalled ||
- value == kAvailabilityInstalledOnlyKioskSupported) &&
+ (value == kAvailabilityInstalled &&
base::FeatureList::IsEnabled(kEnableArcFeature));
}
@@ -65,10 +61,15 @@ bool IsArcKioskAvailable() {
if (command_line->HasSwitch(chromeos::switches::kArcAvailability)) {
std::string value =
command_line->GetSwitchValueASCII(chromeos::switches::kArcAvailability);
- if (value == kAvailabilityInstalledOnlyKioskSupported)
+ if (value == kAvailabilityInstalled)
return true;
+ return IsArcAvailable();
}
+ // TODO(hidehiko): Remove this when session_manager supports the new flag.
+ if (command_line->HasSwitch(chromeos::switches::kArcAvailable))
+ return true;
+
// If not special kiosk device case, use general ARC check.
return IsArcAvailable();
}
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | components/arc/arc_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698