| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/signin/core/common/profile_management_switches.h" | 5 #include "components/signin/core/common/profile_management_switches.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "components/signin/core/common/signin_switches.h" | 10 #include "components/signin/core/common/signin_switches.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } // namespace | 119 } // namespace |
| 120 | 120 |
| 121 namespace switches { | 121 namespace switches { |
| 122 | 122 |
| 123 bool IsEnableAccountConsistency() { | 123 bool IsEnableAccountConsistency() { |
| 124 return GetProcessState() >= STATE_ACCOUNT_CONSISTENCY; | 124 return GetProcessState() >= STATE_ACCOUNT_CONSISTENCY; |
| 125 } | 125 } |
| 126 | 126 |
| 127 bool IsEnableWebBasedSignin() { | 127 bool IsEnableWebBasedSignin() { |
| 128 return CommandLine::ForCurrentProcess()->HasSwitch( | 128 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 129 switches::kEnableWebBasedSignin) && !IsNewProfileManagement(); | 129 switches::kEnableWebBasedSignin) && !IsNewProfileManagement() && |
| 130 !IsEnableWebviewBasedSignin(); |
| 131 } |
| 132 |
| 133 bool IsEnableWebviewBasedSignin() { |
| 134 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 135 switches::kEnableWebviewBasedSignin); |
| 130 } | 136 } |
| 131 | 137 |
| 132 bool IsExtensionsMultiAccount() { | 138 bool IsExtensionsMultiAccount() { |
| 133 return CheckFlag(switches::kExtensionsMultiAccount, | 139 return CheckFlag(switches::kExtensionsMultiAccount, |
| 134 STATE_NEW_PROFILE_MANAGEMENT); | 140 STATE_NEW_PROFILE_MANAGEMENT); |
| 135 } | 141 } |
| 136 | 142 |
| 137 bool IsFastUserSwitching() { | 143 bool IsFastUserSwitching() { |
| 138 return CommandLine::ForCurrentProcess()->HasSwitch( | 144 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 139 switches::kFastUserSwitching); | 145 switches::kFastUserSwitching); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 command_line->AppendSwitch(switches::kEnableNewProfileManagement); | 181 command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
| 176 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); | 182 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); |
| 177 } | 183 } |
| 178 | 184 |
| 179 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { | 185 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { |
| 180 command_line->AppendSwitch(switches::kEnableAccountConsistency); | 186 command_line->AppendSwitch(switches::kEnableAccountConsistency); |
| 181 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); | 187 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); |
| 182 } | 188 } |
| 183 | 189 |
| 184 } // namespace switches | 190 } // namespace switches |
| OLD | NEW |