| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/arc/arc_bridge_service.h" | 5 #include "components/arc/arc_bridge_service.h" |
| 6 | 6 |
| 7 #include <utility> | |
| 8 | |
| 9 #include "base/command_line.h" | |
| 10 #include "base/feature_list.h" | |
| 11 #include "base/sequenced_task_runner.h" | |
| 12 #include "base/threading/thread_task_runner_handle.h" | |
| 13 #include "chromeos/chromeos_switches.h" | |
| 14 | |
| 15 namespace arc { | 7 namespace arc { |
| 16 | 8 |
| 17 namespace { | |
| 18 | |
| 19 const base::Feature kArcEnabledFeature{"EnableARC", | |
| 20 base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 21 | |
| 22 } // namespace | |
| 23 | |
| 24 ArcBridgeService::ArcBridgeService() = default; | 9 ArcBridgeService::ArcBridgeService() = default; |
| 25 | 10 |
| 26 ArcBridgeService::~ArcBridgeService() = default; | 11 ArcBridgeService::~ArcBridgeService() = default; |
| 27 | 12 |
| 28 // static | |
| 29 bool ArcBridgeService::GetEnabled(const base::CommandLine* command_line) { | |
| 30 return command_line->HasSwitch(chromeos::switches::kEnableArc) || | |
| 31 (command_line->HasSwitch(chromeos::switches::kArcAvailable) && | |
| 32 base::FeatureList::IsEnabled(kArcEnabledFeature)); | |
| 33 } | |
| 34 | |
| 35 // static | |
| 36 bool ArcBridgeService::GetAvailable(const base::CommandLine* command_line) { | |
| 37 return command_line->HasSwitch(chromeos::switches::kArcAvailable); | |
| 38 } | |
| 39 | |
| 40 } // namespace arc | 13 } // namespace arc |
| OLD | NEW |