Chromium Code Reviews| 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 "components/signin/core/common/signin_switches.h" | 9 #include "components/signin/core/common/signin_switches.h" |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 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() { | 48 bool IsFastUserSwitching() { |
| 49 bool is_just_new_menu = | |
| 50 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu) && | |
| 51 !IsNewProfileManagement(); | |
| 49 return CommandLine::ForCurrentProcess()->HasSwitch( | 52 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 50 switches::kFastUserSwitching); | 53 switches::kFastUserSwitching) || is_just_new_menu; |
|
Roger Tawa OOO till Jul 10th
2014/04/17 15:16:43
Rename variable maybe?
|is_just_new_menu| -> |use_
noms (inactive)
2014/04/17 15:20:10
Done.
| |
| 51 } | 54 } |
| 52 | 55 |
| 53 bool IsGoogleProfileInfo() { | 56 bool IsGoogleProfileInfo() { |
| 54 return CheckProfileManagementFlag(switches::kGoogleProfileInfo, true); | 57 return CheckProfileManagementFlag(switches::kGoogleProfileInfo, true); |
| 55 } | 58 } |
| 56 | 59 |
| 57 bool IsNewAvatarMenu() { | 60 bool IsNewAvatarMenu() { |
| 58 bool is_new_avatar_menu = | 61 bool is_new_avatar_menu = |
| 59 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); | 62 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); |
| 60 return is_new_avatar_menu || IsNewProfileManagement(); | 63 return is_new_avatar_menu || IsNewProfileManagement(); |
| 61 } | 64 } |
| 62 | 65 |
| 63 bool IsNewProfileManagement() { | 66 bool IsNewProfileManagement() { |
| 64 return CheckProfileManagementFlag(switches::kNewProfileManagement, true); | 67 return CheckProfileManagementFlag(switches::kNewProfileManagement, true); |
| 65 } | 68 } |
| 66 | 69 |
| 67 bool IsNewProfileManagementPreviewEnabled() { | 70 bool IsNewProfileManagementPreviewEnabled() { |
| 68 bool is_new_avatar_menu = | 71 bool is_new_avatar_menu = |
| 69 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); | 72 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); |
| 70 return is_new_avatar_menu && IsNewProfileManagement(); | 73 return is_new_avatar_menu && IsNewProfileManagement(); |
| 71 } | 74 } |
| 72 | 75 |
| 73 } // namespace switches | 76 } // namespace switches |
| OLD | NEW |