Skip to content

Commit

Permalink
Disable new avatar menu when web-based signin is on
Browse files Browse the repository at this point in the history
BUG=431866

Review URL: https://codereview.chromium.org/718793002

Cr-Commit-Position: refs/heads/master@{#303760}
  • Loading branch information
guohui authored and Commit bot committed Nov 12, 2014
1 parent 0d49051 commit 3655274
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/signin/core/common/profile_management_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ enum State {
};

State GetProcessState() {
// Disables the new avatar menu if the web-based signin is turned on, because
// the new avatar menu always uses the inline signin, which may break some
// SAML users.
if (switches::IsEnableWebBasedSignin())
return STATE_OLD_AVATAR_MENU;

// Find the state of both command line args.
bool is_new_avatar_menu =
CommandLine::ForCurrentProcess()->HasSwitch(
Expand Down Expand Up @@ -126,8 +132,7 @@ bool IsEnableAccountConsistency() {

bool IsEnableWebBasedSignin() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableWebBasedSignin) && !IsNewProfileManagement() &&
!IsEnableWebviewBasedSignin();
switches::kEnableWebBasedSignin) && !IsEnableWebviewBasedSignin();
}

bool IsEnableWebviewBasedSignin() {
Expand Down

0 comments on commit 3655274

Please sign in to comment.