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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool is_new_avatar_menu = | 133 bool is_new_avatar_menu = |
134 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); | 134 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); |
135 return is_new_avatar_menu || IsNewProfileManagement(); | 135 return is_new_avatar_menu || IsNewProfileManagement(); |
136 } | 136 } |
137 | 137 |
138 bool IsNewProfileManagement() { | 138 bool IsNewProfileManagement() { |
139 return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT; | 139 return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT; |
140 } | 140 } |
141 | 141 |
142 bool IsNewProfileManagementPreviewEnabled() { | 142 bool IsNewProfileManagementPreviewEnabled() { |
143 bool is_new_avatar_menu = | 143 // No promotion to Enable Account Consistency. |
144 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); | 144 return false; |
145 return is_new_avatar_menu && IsNewProfileManagement(); | |
146 } | 145 } |
147 | 146 |
148 void EnableNewProfileManagementForTesting(base::CommandLine* command_line) { | 147 void EnableNewProfileManagementForTesting(base::CommandLine* command_line) { |
149 command_line->AppendSwitch(switches::kEnableNewProfileManagement); | 148 command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
150 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); | 149 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); |
151 } | 150 } |
152 | 151 |
153 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { | 152 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { |
154 command_line->AppendSwitch(switches::kEnableAccountConsistency); | 153 command_line->AppendSwitch(switches::kEnableAccountConsistency); |
155 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); | 154 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); |
156 } | 155 } |
157 | 156 |
158 } // namespace switches | 157 } // namespace switches |
OLD | NEW |