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

Unified Diff: components/arc/arc_util.cc

Issue 2725113002: Enable ARC kiosk mode always when ARC is available (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: components/arc/arc_util.cc
diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc
index bb876f03485aa5822295250110e3e4b6bbab4f29..94a44c07c7e7a4b174714e9ceb37d857819a0f9b 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;
hidehiko 2017/03/02 06:38:49 Could you add "return IsArcAvailable();" here, too
elijahtaylor1 2017/03/02 19:13:35 I will do this, but IMO this adds a cleanup task.
}
+ // TODO(hidehiko): Remove this when session_manager supports the new flag.
+ if (command_line->HasSwitch(chromeos::switches::kArcAvailable)) {
hidehiko 2017/03/02 06:38:49 nit: could you elide brace for consistency?
elijahtaylor1 2017/03/02 19:13:35 Done.
+ return true;
+ }
+
// If not special kiosk device case, use general ARC check.
return IsArcAvailable();
}

Powered by Google App Engine
This is Rietveld 408576698