| 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 27 matching lines...) Expand all Loading... |
| 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 IsExtensionsMultiAccount() { |
| 49 return CheckProfileManagementFlag(switches::kExtensionsMultiAccount, true); |
| 50 } |
| 51 |
| 48 bool IsFastUserSwitching() { | 52 bool IsFastUserSwitching() { |
| 49 bool use_mirror_promo_menu = | 53 bool use_mirror_promo_menu = |
| 50 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu) && | 54 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu) && |
| 51 !IsNewProfileManagement(); | 55 !IsNewProfileManagement(); |
| 52 return CommandLine::ForCurrentProcess()->HasSwitch( | 56 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 53 switches::kFastUserSwitching) || use_mirror_promo_menu; | 57 switches::kFastUserSwitching) || use_mirror_promo_menu; |
| 54 } | 58 } |
| 55 | 59 |
| 56 bool IsGoogleProfileInfo() { | 60 bool IsGoogleProfileInfo() { |
| 57 return CheckProfileManagementFlag(switches::kGoogleProfileInfo, true); | 61 return CheckProfileManagementFlag(switches::kGoogleProfileInfo, true); |
| 58 } | 62 } |
| 59 | 63 |
| 60 bool IsNewAvatarMenu() { | 64 bool IsNewAvatarMenu() { |
| 61 bool is_new_avatar_menu = | 65 bool is_new_avatar_menu = |
| 62 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); | 66 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); |
| 63 return is_new_avatar_menu || IsNewProfileManagement(); | 67 return is_new_avatar_menu || IsNewProfileManagement(); |
| 64 } | 68 } |
| 65 | 69 |
| 66 bool IsNewProfileManagement() { | 70 bool IsNewProfileManagement() { |
| 67 return CheckProfileManagementFlag(switches::kNewProfileManagement, true); | 71 return CheckProfileManagementFlag(switches::kNewProfileManagement, true); |
| 68 } | 72 } |
| 69 | 73 |
| 70 bool IsNewProfileManagementPreviewEnabled() { | 74 bool IsNewProfileManagementPreviewEnabled() { |
| 71 bool is_new_avatar_menu = | 75 bool is_new_avatar_menu = |
| 72 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); | 76 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewAvatarMenu); |
| 73 return is_new_avatar_menu && IsNewProfileManagement(); | 77 return is_new_avatar_menu && IsNewProfileManagement(); |
| 74 } | 78 } |
| 75 | 79 |
| 76 } // namespace switches | 80 } // namespace switches |
| OLD | NEW |