| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return GetProcessState() >= STATE_ACCOUNT_CONSISTENCY; | 128 return GetProcessState() >= STATE_ACCOUNT_CONSISTENCY; |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool IsEnableWebBasedSignin() { | 131 bool IsEnableWebBasedSignin() { |
| 132 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 132 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 133 switches::kEnableWebBasedSignin) && | 133 switches::kEnableWebBasedSignin) && |
| 134 !IsEnableWebviewBasedSignin(); | 134 !IsEnableWebviewBasedSignin(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool IsEnableWebviewBasedSignin() { | 137 bool IsEnableWebviewBasedSignin() { |
| 138 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 138 // For now, the webview is enabled only for desktop. |
| 139 switches::kEnableWebviewBasedSignin); | 139 #if defined(OS_CHROMEOS) |
| 140 return false; |
| 141 #else |
| 142 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 143 switches::kEnableIframeBasedSignin); |
| 144 #endif |
| 140 } | 145 } |
| 141 | 146 |
| 142 bool IsExtensionsMultiAccount() { | 147 bool IsExtensionsMultiAccount() { |
| 143 return CheckFlag(switches::kExtensionsMultiAccount, | 148 return CheckFlag(switches::kExtensionsMultiAccount, |
| 144 STATE_NEW_PROFILE_MANAGEMENT); | 149 STATE_NEW_PROFILE_MANAGEMENT); |
| 145 } | 150 } |
| 146 | 151 |
| 147 bool IsFastUserSwitching() { | 152 bool IsFastUserSwitching() { |
| 148 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 153 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 149 switches::kFastUserSwitching); | 154 switches::kFastUserSwitching); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 command_line->AppendSwitch(switches::kEnableNewProfileManagement); | 190 command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
| 186 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); | 191 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); |
| 187 } | 192 } |
| 188 | 193 |
| 189 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { | 194 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { |
| 190 command_line->AppendSwitch(switches::kEnableAccountConsistency); | 195 command_line->AppendSwitch(switches::kEnableAccountConsistency); |
| 191 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); | 196 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); |
| 192 } | 197 } |
| 193 | 198 |
| 194 } // namespace switches | 199 } // namespace switches |
| OLD | NEW |