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

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

Issue 235833002: [Mac] Redesign the avatar bubble UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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
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 "components/signin/core/common/signin_switches.h" 9 #include "components/signin/core/common/signin_switches.h"
10 10
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 namespace switches { 42 namespace switches {
43 43
44 bool IsEnableWebBasedSignin() { 44 bool IsEnableWebBasedSignin() {
45 return CheckProfileManagementFlag(switches::kEnableWebBasedSignin, false); 45 return CheckProfileManagementFlag(switches::kEnableWebBasedSignin, false);
46 } 46 }
47 47
48 bool IsFastUserSwitching() {
49 return CommandLine::ForCurrentProcess()->HasSwitch(
50 switches::kFastUserSwitching);
51 }
52
53 bool IsGoogleProfileInfo() { 48 bool IsGoogleProfileInfo() {
54 return CheckProfileManagementFlag(switches::kGoogleProfileInfo, true); 49 return CheckProfileManagementFlag(switches::kGoogleProfileInfo, true);
55 } 50 }
56 51
57 bool IsNewAvatarMenu() { 52 bool IsNewAvatarMenu() {
58 bool is_new_avatar_menu = 53 bool is_new_avatar_menu =
59 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); 54 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu);
60 return is_new_avatar_menu || IsNewProfileManagement(); 55 return is_new_avatar_menu || IsNewProfileManagement();
61 } 56 }
62 57
63 bool IsNewProfileManagement() { 58 bool IsNewProfileManagement() {
64 return CheckProfileManagementFlag(switches::kNewProfileManagement, true); 59 return CheckProfileManagementFlag(switches::kNewProfileManagement, true);
65 } 60 }
66 61
67 bool IsNewProfileManagementPreviewEnabled() { 62 bool IsNewProfileManagementPreviewEnabled() {
68 bool is_new_avatar_menu = 63 bool is_new_avatar_menu =
69 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); 64 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu);
70 return is_new_avatar_menu && IsNewProfileManagement(); 65 return is_new_avatar_menu && IsNewProfileManagement();
71 } 66 }
72 67
68 bool IsFastUserSwitching() {
69 bool is_just_new_menu =
70 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu) &&
71 !IsNewProfileManagement();
72 return CommandLine::ForCurrentProcess()->HasSwitch(
73 switches::kFastUserSwitching) || is_just_new_menu;
74 }
75
73 } // namespace switches 76 } // namespace switches
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698