| 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> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // static | 29 // static |
| 30 bool ArcBridgeService::GetEnabled(const base::CommandLine* command_line) { | 30 bool ArcBridgeService::GetEnabled(const base::CommandLine* command_line) { |
| 31 return command_line->HasSwitch(chromeos::switches::kEnableArc) || | 31 return command_line->HasSwitch(chromeos::switches::kEnableArc) || |
| 32 (command_line->HasSwitch(chromeos::switches::kArcAvailable) && | 32 (command_line->HasSwitch(chromeos::switches::kArcAvailable) && |
| 33 base::FeatureList::IsEnabled(kArcEnabledFeature)); | 33 base::FeatureList::IsEnabled(kArcEnabledFeature)); |
| 34 } | 34 } |
| 35 | 35 |
| 36 bool ArcBridgeService::GetKioskEnabled(const base::CommandLine* command_line) { | 36 bool ArcBridgeService::GetKioskEnabled(const base::CommandLine* command_line) { |
| 37 return GetEnabled(command_line) || | 37 return GetEnabled(command_line) || |
| 38 command_line->HasSwitch(chromeos::switches::kEnableArcKiosk); | 38 command_line->HasSwitch(chromeos::switches::kArcAvailable); |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool ArcBridgeService::GetKioskStarted(const base::CommandLine* command_line) { | 41 bool ArcBridgeService::GetKioskStarted(const base::CommandLine* command_line) { |
| 42 return user_manager::UserManager::IsInitialized() && | 42 return user_manager::UserManager::IsInitialized() && |
| 43 user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp() && | 43 user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp() && |
| 44 GetKioskEnabled(command_line); | 44 GetKioskEnabled(command_line); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // static | 47 // static |
| 48 bool ArcBridgeService::GetAvailable(const base::CommandLine* command_line) { | 48 bool ArcBridgeService::GetAvailable(const base::CommandLine* command_line) { |
| 49 return command_line->HasSwitch(chromeos::switches::kArcAvailable); | 49 return command_line->HasSwitch(chromeos::switches::kArcAvailable); |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace arc | 52 } // namespace arc |
| OLD | NEW |