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

Unified Diff: components/arc/arc_util.cc

Issue 2648213004: Migrate --enable-arc and --arc-available part 1. (Closed)
Patch Set: Address comments. Created 3 years, 11 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
new file mode 100644
index 0000000000000000000000000000000000000000..46367d021f901288dfe5c1e2d7712e7b7d511ae4
--- /dev/null
+++ b/components/arc/arc_util.cc
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/arc/arc_util.h"
+
+#include "base/command_line.h"
+#include "base/feature_list.h"
+#include "chromeos/chromeos_switches.h"
+
+namespace arc {
+
+namespace {
+
+// This is for finch. See also crbug.com/633704 for details.
+// TODO(hidehiko): More comments of the intention how this works, when
+// we unify the commandline flags.
+const base::Feature kEnableArcFeature{"EnableARC",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
+} // namespace
+
+bool IsArcAvailable() {
+ const auto* command_line = base::CommandLine::ForCurrentProcess();
+ // TODO(hidehiko): Unify --enable-arc and --arc-available flags.
Yusuke Sato 2017/01/24 19:02:44 What about adding something like this? // If swi
hidehiko 2017/01/25 17:54:46 Done.
+ return command_line->HasSwitch(chromeos::switches::kEnableArc) ||
+ (command_line->HasSwitch(chromeos::switches::kArcAvailable) &&
+ base::FeatureList::IsEnabled(kEnableArcFeature));
+}
+
+} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698