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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 471023003: Make sure the new confirmation bubble is always shown upon signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: roger's comments addressed and rebased Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
index 38b928e2caa4931567509f3fefaacf680b849eaf..b25268c08f836e99daf9bb9d21ed24b0240ef3af 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -140,8 +140,7 @@ void InlineSigninHelper::OnSigninOAuthInformationAvailable(
std::string is_constrained;
net::GetValueForKeyInQuery(current_url_, "constrained", &is_constrained);
- bool show_inline_confirmation_for_sync =
- switches::IsNewAvatarMenu() && is_constrained == "1";
+ bool is_new_avatar_menu = switches::IsNewAvatarMenu();
OneClickSigninSyncStarter::StartSyncMode start_mode;
if (source == signin::SOURCE_SETTINGS || choose_what_to_sync_) {
@@ -153,7 +152,7 @@ void InlineSigninHelper::OnSigninOAuthInformationAvailable(
OneClickSigninSyncStarter::SHOW_SETTINGS_WITHOUT_CONFIGURE :
OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST;
} else {
- start_mode = show_inline_confirmation_for_sync ?
+ start_mode = is_new_avatar_menu ?
OneClickSigninSyncStarter::CONFIRM_SYNC_SETTINGS_FIRST :
OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS;
}
@@ -163,11 +162,14 @@ void InlineSigninHelper::OnSigninOAuthInformationAvailable(
confirmation_required =
OneClickSigninSyncStarter::CONFIRM_UNTRUSTED_SIGNIN;
} else {
+ // Suppress confirmation bubble when sign in through the new avatar menu,
+ // since a confirmation card will be automatically shown inside the existing
Alexei Svitkine (slow) 2014/08/15 15:51:47 Nit: bad indent
guohui 2014/08/15 16:07:00 Done.
+ // avatar bubble.
confirmation_required =
source == signin::SOURCE_SETTINGS ||
source == signin::SOURCE_WEBSTORE_INSTALL ||
choose_what_to_sync_ ||
- show_inline_confirmation_for_sync ?
+ (is_new_avatar_menu && is_constrained == "1") ?
OneClickSigninSyncStarter::NO_CONFIRMATION :
OneClickSigninSyncStarter::CONFIRM_AFTER_SIGNIN;
}

Powered by Google App Engine
This is Rietveld 408576698