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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 12177022: Adding field trial branching code to use either the modal dialog or the bubble for sing in confirma… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_helper.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index c3524fd0f3cae9456c51804ff38d786520ea1e44..85501b0c2bbb92045570cbdf433ea7a1d25d3792 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -191,6 +191,11 @@ bool IsValidGaiaSigninRedirectOrResponseURL(const GURL& url) {
return false;
}
+// Constants for the modal dialog / bubble sign in to chrome confirmation
+// experiment
+const char kSignInToChromeDialogFieldTrialName[] = "SignInToChromeConfirmation";
+const char kSignInConfirmBubbleGroupName[] = "Bubble";
+
} // namespace
// The infobar asking the user if they want to use one-click sign in.
@@ -860,6 +865,13 @@ void OneClickSigninHelper::DidStopLoading(
<< " auto_accept=" << auto_accept_
<< " source=" << source_;
+ BrowserWindow::OneClickSigninBubbleType bubble_type;
+ if (base::FieldTrialList::FindFullName(kSignInToChromeDialogFieldTrialName) ==
+ kSignInConfirmBubbleGroupName)
+ bubble_type = BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE;
+ else
+ bubble_type = BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG;
+
switch (auto_accept_) {
case AUTO_ACCEPT_NONE:
if (SyncPromoUI::UseWebBasedSigninFlow()) {
@@ -875,7 +887,7 @@ void OneClickSigninHelper::DidStopLoading(
case AUTO_ACCEPT_ACCEPTED:
SigninManager::DisableOneClickSignIn(profile);
browser->window()->ShowOneClickSigninBubble(
- BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG,
+ bubble_type,
base::Bind(&StartSync, profile, browser, auto_accept_, session_index_,
email_, password_));
break;
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698