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

Side by Side Diff: components/arc/arc_bridge_service.cc

Issue 2730003002: [M57] Enable ARC kiosk mode always when ARC is available (Closed)
Patch Set: rebase Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698