| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace | 105 } // namespace |
| 106 | 106 |
| 107 namespace switches { | 107 namespace switches { |
| 108 | 108 |
| 109 bool IsEnableAccountConsistency() { | 109 bool IsEnableAccountConsistency() { |
| 110 return GetProcessState() >= STATE_ACCOUNT_CONSISTENCY; | 110 return GetProcessState() >= STATE_ACCOUNT_CONSISTENCY; |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool IsEnableWebviewBasedSignin() { | |
| 114 // For now, the webview is enabled only for desktop. | |
| 115 #if defined(OS_CHROMEOS) | |
| 116 return false; | |
| 117 #else | |
| 118 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 119 switches::kEnableIframeBasedSignin); | |
| 120 #endif | |
| 121 } | |
| 122 | |
| 123 bool IsExtensionsMultiAccount() { | 113 bool IsExtensionsMultiAccount() { |
| 124 return CheckFlag(switches::kExtensionsMultiAccount, | 114 return CheckFlag(switches::kExtensionsMultiAccount, |
| 125 STATE_ACCOUNT_CONSISTENCY); | 115 STATE_ACCOUNT_CONSISTENCY); |
| 126 } | 116 } |
| 127 | 117 |
| 128 bool IsGoogleProfileInfo() { | 118 bool IsGoogleProfileInfo() { |
| 129 return CheckFlag(switches::kGoogleProfileInfo, STATE_NEW_AVATAR_MENU); | 119 return CheckFlag(switches::kGoogleProfileInfo, STATE_NEW_AVATAR_MENU); |
| 130 } | 120 } |
| 131 | 121 |
| 132 bool IsNewProfileManagement() { | 122 bool IsNewProfileManagement() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 147 command_line->AppendSwitch(switches::kEnableNewProfileManagement); | 137 command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
| 148 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); | 138 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); |
| 149 } | 139 } |
| 150 | 140 |
| 151 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { | 141 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { |
| 152 command_line->AppendSwitch(switches::kEnableAccountConsistency); | 142 command_line->AppendSwitch(switches::kEnableAccountConsistency); |
| 153 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); | 143 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); |
| 154 } | 144 } |
| 155 | 145 |
| 156 } // namespace switches | 146 } // namespace switches |
| OLD | NEW |