Index: components/signin/core/common/profile_management_switches.cc |
diff --git a/components/signin/core/common/profile_management_switches.cc b/components/signin/core/common/profile_management_switches.cc |
index 768ae5cd9fec8e314c39382bd4f05c56eab05171..523117410de190be3bee18db532e31d0ea3f83c1 100644 |
--- a/components/signin/core/common/profile_management_switches.cc |
+++ b/components/signin/core/common/profile_management_switches.cc |
@@ -17,7 +17,6 @@ const char kNewProfileManagementFieldTrialName[] = "NewProfileManagement"; |
// below assumes the order of the values in this enum. That is, new profile |
// management is included in consistent identity. |
enum State { |
- STATE_OLD_AVATAR_MENU, |
STATE_NEW_AVATAR_MENU, |
STATE_NEW_PROFILE_MANAGEMENT, |
STATE_ACCOUNT_CONSISTENCY, |
@@ -25,26 +24,20 @@ enum State { |
State GetProcessState() { |
// Find the state of both command line args. |
- bool is_new_avatar_menu = base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableNewAvatarMenu); |
bool is_new_profile_management = |
base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableNewProfileManagement); |
bool is_consistent_identity = |
base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableAccountConsistency); |
- bool not_new_avatar_menu = base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableNewAvatarMenu); |
bool not_new_profile_management = |
base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kDisableNewProfileManagement); |
bool not_consistent_identity = |
base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kDisableAccountConsistency); |
- int count_args = (is_new_avatar_menu ? 1 : 0) + |
- (is_new_profile_management ? 1 : 0) + |
+ int count_args = (is_new_profile_management ? 1 : 0) + |
(is_consistent_identity ? 1 : 0) + |
- (not_new_avatar_menu ? 1 : 0) + |
(not_new_profile_management ? 1 : 0) + |
(not_consistent_identity ? 1 : 0); |
bool invalid_commandline = count_args > 1; |
@@ -67,17 +60,12 @@ State GetProcessState() { |
base::FieldTrialList::FindFullName(kNewProfileManagementFieldTrialName); |
} |
- // Forcing the old avatar menu takes precedent over other args. |
// Enable command line args take precedent over disable command line args. |
// Consistent identity args take precedent over new profile management args. |
- if (not_new_avatar_menu) { |
- return STATE_OLD_AVATAR_MENU; |
- } else if (is_consistent_identity) { |
+ if (is_consistent_identity) { |
return STATE_ACCOUNT_CONSISTENCY; |
} else if (is_new_profile_management) { |
return STATE_NEW_PROFILE_MANAGEMENT; |
- } else if (is_new_avatar_menu) { |
- return STATE_NEW_AVATAR_MENU; |
} else if (not_new_profile_management) { |
return STATE_NEW_AVATAR_MENU; |
} else if (not_consistent_identity) { |
@@ -141,15 +129,6 @@ bool IsGoogleProfileInfo() { |
return CheckFlag(switches::kGoogleProfileInfo, STATE_NEW_AVATAR_MENU); |
} |
-bool IsNewAvatarMenu() { |
- // NewAvatarMenu is only available on desktop. |
-#if defined(OS_ANDROID) || defined(OS_IOS) || defined(OS_CHROMEOS) |
- return false; |
-#else |
- return GetProcessState() >= STATE_NEW_AVATAR_MENU; |
-#endif |
-} |
- |
bool IsNewProfileManagement() { |
return GetProcessState() >= STATE_NEW_PROFILE_MANAGEMENT; |
} |
@@ -159,16 +138,6 @@ bool IsNewProfileManagementPreviewEnabled() { |
return false; |
} |
-void EnableNewAvatarMenuForTesting(base::CommandLine* command_line) { |
- command_line->AppendSwitch(switches::kEnableNewAvatarMenu); |
- DCHECK(!command_line->HasSwitch(switches::kDisableNewAvatarMenu)); |
-} |
- |
-void DisableNewAvatarMenuForTesting(base::CommandLine* command_line) { |
- command_line->AppendSwitch(switches::kDisableNewAvatarMenu); |
- DCHECK(!command_line->HasSwitch(switches::kEnableNewAvatarMenu)); |
-} |
- |
void EnableNewProfileManagementForTesting(base::CommandLine* command_line) { |
command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); |