| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 bool IsNewProfileManagement() { | 153 bool IsNewProfileManagement() { |
| 154 return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT; | 154 return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT; |
| 155 } | 155 } |
| 156 | 156 |
| 157 bool IsNewProfileManagementPreviewEnabled() { | 157 bool IsNewProfileManagementPreviewEnabled() { |
| 158 // No promotion to Enable Account Consistency. | 158 // No promotion to Enable Account Consistency. |
| 159 return false; | 159 return false; |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool UseNewGaiaFlow() { |
| 163 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 164 switches::kEnableNewGaiaSigninFlow); |
| 165 } |
| 166 |
| 162 void EnableNewAvatarMenuForTesting(base::CommandLine* command_line) { | 167 void EnableNewAvatarMenuForTesting(base::CommandLine* command_line) { |
| 163 command_line->AppendSwitch(switches::kEnableNewAvatarMenu); | 168 command_line->AppendSwitch(switches::kEnableNewAvatarMenu); |
| 164 DCHECK(!command_line->HasSwitch(switches::kDisableNewAvatarMenu)); | 169 DCHECK(!command_line->HasSwitch(switches::kDisableNewAvatarMenu)); |
| 165 } | 170 } |
| 166 | 171 |
| 167 void DisableNewAvatarMenuForTesting(base::CommandLine* command_line) { | 172 void DisableNewAvatarMenuForTesting(base::CommandLine* command_line) { |
| 168 command_line->AppendSwitch(switches::kDisableNewAvatarMenu); | 173 command_line->AppendSwitch(switches::kDisableNewAvatarMenu); |
| 169 DCHECK(!command_line->HasSwitch(switches::kEnableNewAvatarMenu)); | 174 DCHECK(!command_line->HasSwitch(switches::kEnableNewAvatarMenu)); |
| 170 } | 175 } |
| 171 | 176 |
| 172 void EnableNewProfileManagementForTesting(base::CommandLine* command_line) { | 177 void EnableNewProfileManagementForTesting(base::CommandLine* command_line) { |
| 173 command_line->AppendSwitch(switches::kEnableNewProfileManagement); | 178 command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
| 174 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); | 179 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); |
| 175 } | 180 } |
| 176 | 181 |
| 177 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { | 182 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { |
| 178 command_line->AppendSwitch(switches::kEnableAccountConsistency); | 183 command_line->AppendSwitch(switches::kEnableAccountConsistency); |
| 179 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); | 184 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); |
| 180 } | 185 } |
| 181 | 186 |
| 182 } // namespace switches | 187 } // namespace switches |
| OLD | NEW |