Chromium Code Reviews| 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 |