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

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

Issue 480453002: Disable UI flags for non-desktop OSes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only handle NewAvatarMenu in this CL Created 6 years, 3 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 | Annotate | Revision Log
« 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool IsFastUserSwitching() { 137 bool IsFastUserSwitching() {
138 return CommandLine::ForCurrentProcess()->HasSwitch( 138 return CommandLine::ForCurrentProcess()->HasSwitch(
139 switches::kFastUserSwitching); 139 switches::kFastUserSwitching);
140 } 140 }
141 141
142 bool IsGoogleProfileInfo() { 142 bool IsGoogleProfileInfo() {
143 return CheckFlag(switches::kGoogleProfileInfo, STATE_NEW_AVATAR_MENU); 143 return CheckFlag(switches::kGoogleProfileInfo, STATE_NEW_AVATAR_MENU);
144 } 144 }
145 145
146 bool IsNewAvatarMenu() { 146 bool IsNewAvatarMenu() {
147 // NewAvatarMenu is only available on desktop.
148 #if defined(OS_ANDROID) || defined(OS_IOS) || defined(OS_CHROMEOS)
149 return false;
150 #else
147 return GetProcessState() >= STATE_NEW_AVATAR_MENU; 151 return GetProcessState() >= STATE_NEW_AVATAR_MENU;
152 #endif
148 } 153 }
149 154
150 bool IsNewProfileManagement() { 155 bool IsNewProfileManagement() {
151 return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT; 156 return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT;
152 } 157 }
153 158
154 bool IsNewProfileManagementPreviewEnabled() { 159 bool IsNewProfileManagementPreviewEnabled() {
155 // No promotion to Enable Account Consistency. 160 // No promotion to Enable Account Consistency.
156 return false; 161 return false;
157 } 162 }
(...skipping 12 matching lines...) Expand all
170 command_line->AppendSwitch(switches::kEnableNewProfileManagement); 175 command_line->AppendSwitch(switches::kEnableNewProfileManagement);
171 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); 176 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement));
172 } 177 }
173 178
174 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { 179 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) {
175 command_line->AppendSwitch(switches::kEnableAccountConsistency); 180 command_line->AppendSwitch(switches::kEnableAccountConsistency);
176 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); 181 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency));
177 } 182 }
178 183
179 } // namespace switches 184 } // 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