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

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

Issue 2707133006: Start ARC and sign in after Chrome OS login (Closed)
Patch Set: rebase to ToT 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 | « components/arc/arc_util.h ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_util.h" 5 #include "components/arc/arc_util.h"
6 6
7 #include <string> 7 #include <string>
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 // For transition, fallback to old flags. 50 // For transition, fallback to old flags.
51 // TODO(hidehiko): Remove this and clean up whole this function, when 51 // TODO(hidehiko): Remove this and clean up whole this function, when
52 // session_manager supports a new flag. 52 // session_manager supports a new flag.
53 return command_line->HasSwitch(chromeos::switches::kEnableArc) || 53 return command_line->HasSwitch(chromeos::switches::kEnableArc) ||
54 (command_line->HasSwitch(chromeos::switches::kArcAvailable) && 54 (command_line->HasSwitch(chromeos::switches::kArcAvailable) &&
55 base::FeatureList::IsEnabled(kEnableArcFeature)); 55 base::FeatureList::IsEnabled(kEnableArcFeature));
56 } 56 }
57 57
58 bool ShouldArcAlwaysStart() {
59 return base::CommandLine::ForCurrentProcess()->HasSwitch(
60 chromeos::switches::kArcAlwaysStart);
61 }
62
63 void SetArcAlwaysStartForTesting() {
64 base::CommandLine::ForCurrentProcess()->AppendSwitch(
65 chromeos::switches::kArcAlwaysStart);
66 }
67
58 bool IsArcKioskAvailable() { 68 bool IsArcKioskAvailable() {
59 const auto* command_line = base::CommandLine::ForCurrentProcess(); 69 const auto* command_line = base::CommandLine::ForCurrentProcess();
60 70
61 if (command_line->HasSwitch(chromeos::switches::kArcAvailability)) { 71 if (command_line->HasSwitch(chromeos::switches::kArcAvailability)) {
62 std::string value = 72 std::string value =
63 command_line->GetSwitchValueASCII(chromeos::switches::kArcAvailability); 73 command_line->GetSwitchValueASCII(chromeos::switches::kArcAvailability);
64 if (value == kAvailabilityInstalled) 74 if (value == kAvailabilityInstalled)
65 return true; 75 return true;
66 return IsArcAvailable(); 76 return IsArcAvailable();
67 } 77 }
(...skipping 27 matching lines...) Expand all
95 kAvailabilityOfficiallySupportedWithActiveDirectory; 105 kAvailabilityOfficiallySupportedWithActiveDirectory;
96 } 106 }
97 107
98 bool IsArcOptInVerificationDisabled() { 108 bool IsArcOptInVerificationDisabled() {
99 const auto* command_line = base::CommandLine::ForCurrentProcess(); 109 const auto* command_line = base::CommandLine::ForCurrentProcess();
100 return command_line->HasSwitch( 110 return command_line->HasSwitch(
101 chromeos::switches::kDisableArcOptInVerification); 111 chromeos::switches::kDisableArcOptInVerification);
102 } 112 }
103 113
104 } // namespace arc 114 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698