| Index: components/arc/arc_util.cc
|
| diff --git a/components/arc/arc_bridge_service.cc b/components/arc/arc_util.cc
|
| similarity index 50%
|
| copy from components/arc/arc_bridge_service.cc
|
| copy to components/arc/arc_util.cc
|
| index f17d3d62b19e4bb75e98545ceeba5e2ad5de0c7c..05dbe5b355b2b85992a82365daa440534239c7ba 100644
|
| --- a/components/arc/arc_bridge_service.cc
|
| +++ b/components/arc/arc_util.cc
|
| @@ -1,18 +1,16 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// 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_bridge_service.h"
|
| -
|
| -#include <utility>
|
| +#include "components/arc/arc_util.h"
|
|
|
| #include "base/command_line.h"
|
| #include "base/feature_list.h"
|
| -#include "base/sequenced_task_runner.h"
|
| -#include "base/threading/thread_task_runner_handle.h"
|
| #include "chromeos/chromeos_switches.h"
|
| +#include "components/user_manager/user_manager.h"
|
|
|
| namespace arc {
|
| +namespace util {
|
|
|
| namespace {
|
|
|
| @@ -21,20 +19,27 @@ const base::Feature kArcEnabledFeature{"EnableARC",
|
|
|
| } // namespace
|
|
|
| -ArcBridgeService::ArcBridgeService() = default;
|
| -
|
| -ArcBridgeService::~ArcBridgeService() = default;
|
| -
|
| -// static
|
| -bool ArcBridgeService::GetEnabled(const base::CommandLine* command_line) {
|
| +bool IsArcEnabled() {
|
| + const auto* command_line = base::CommandLine::ForCurrentProcess();
|
| return command_line->HasSwitch(chromeos::switches::kEnableArc) ||
|
| (command_line->HasSwitch(chromeos::switches::kArcAvailable) &&
|
| base::FeatureList::IsEnabled(kArcEnabledFeature));
|
| }
|
|
|
| -// static
|
| -bool ArcBridgeService::GetAvailable(const base::CommandLine* command_line) {
|
| +bool IsArcAvailable() {
|
| + const auto* command_line = base::CommandLine::ForCurrentProcess();
|
| return command_line->HasSwitch(chromeos::switches::kArcAvailable);
|
| }
|
|
|
| +bool IsArcKioskMode() {
|
| + return user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp();
|
| +}
|
| +
|
| +bool IsOptInVerificationDisabled() {
|
| + const auto* command_line = base::CommandLine::ForCurrentProcess();
|
| + return command_line->HasSwitch(
|
| + chromeos::switches::kDisableArcOptInVerification);
|
| +}
|
| +
|
| +} // namespace util
|
| } // namespace arc
|
|
|