Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: components/signin/core/common/profile_management_switches.cc

Issue 958963003: Enable account consistency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return STATE_NEW_PROFILE_MANAGEMENT; 78 return STATE_NEW_PROFILE_MANAGEMENT;
79 } else if (is_new_avatar_menu) { 79 } else if (is_new_avatar_menu) {
80 return STATE_NEW_AVATAR_MENU; 80 return STATE_NEW_AVATAR_MENU;
81 } else if (not_new_profile_management) { 81 } else if (not_new_profile_management) {
82 return STATE_OLD_AVATAR_MENU; 82 return STATE_OLD_AVATAR_MENU;
83 } else if (not_consistent_identity) { 83 } else if (not_consistent_identity) {
84 return STATE_OLD_AVATAR_MENU; 84 return STATE_OLD_AVATAR_MENU;
85 } 85 }
86 86
87 // Set the default state 87 // Set the default state
88 #if defined(OS_ANDROID) 88 #if defined(OS_ANDROID) || defined(OS_IOS)
89 State state = STATE_ACCOUNT_CONSISTENCY; 89 State state = STATE_ACCOUNT_CONSISTENCY;
90 #else 90 #else
91 State state = STATE_OLD_AVATAR_MENU; 91 State state = STATE_OLD_AVATAR_MENU;
92 #endif 92 #endif
93 93
94 if (!trial_type.empty()) { 94 if (!trial_type.empty()) {
95 if (trial_type == "Enabled") { 95 if (trial_type == "Enabled") {
96 state = STATE_NEW_PROFILE_MANAGEMENT; 96 state = STATE_NEW_PROFILE_MANAGEMENT;
97 } else if (trial_type == "AccountConsistency") { 97 } else if (trial_type == "AccountConsistency") {
98 state = STATE_ACCOUNT_CONSISTENCY; 98 state = STATE_ACCOUNT_CONSISTENCY;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 command_line->AppendSwitch(switches::kEnableNewProfileManagement); 178 command_line->AppendSwitch(switches::kEnableNewProfileManagement);
179 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); 179 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement));
180 } 180 }
181 181
182 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { 182 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) {
183 command_line->AppendSwitch(switches::kEnableAccountConsistency); 183 command_line->AppendSwitch(switches::kEnableAccountConsistency);
184 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); 184 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency));
185 } 185 }
186 186
187 } // namespace switches 187 } // namespace switches
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698