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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 14646029: Removing branching code for bubble/dialog field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 } 1100 }
1101 } 1101 }
1102 } 1102 }
1103 1103
1104 Browser* browser = chrome::FindBrowserWithWebContents(contents); 1104 Browser* browser = chrome::FindBrowserWithWebContents(contents);
1105 1105
1106 VLOG(1) << "OneClickSigninHelper::DidStopLoading: signin is go." 1106 VLOG(1) << "OneClickSigninHelper::DidStopLoading: signin is go."
1107 << " auto_accept=" << auto_accept_ 1107 << " auto_accept=" << auto_accept_
1108 << " source=" << source_; 1108 << " source=" << source_;
1109 1109
1110 const char kSignInToChromeDialogFieldTrialName[] =
1111 "SignInToChromeConfirmation";
1112 const char kSignInConfirmBubbleGroupName[] = "Bubble";
1113 BrowserWindow::OneClickSigninBubbleType bubble_type;
1114 if (base::FieldTrialList::FindFullName(kSignInToChromeDialogFieldTrialName) ==
1115 kSignInConfirmBubbleGroupName)
1116 bubble_type = BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE;
1117 else
1118 bubble_type = BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG;
1119
1120 switch (auto_accept_) { 1110 switch (auto_accept_) {
1121 case AUTO_ACCEPT_NONE: 1111 case AUTO_ACCEPT_NONE:
1122 if (SyncPromoUI::UseWebBasedSigninFlow() && showing_signin_) 1112 if (SyncPromoUI::UseWebBasedSigninFlow() && showing_signin_)
1123 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_DISMISSED); 1113 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_DISMISSED);
1124 break; 1114 break;
1125 case AUTO_ACCEPT_ACCEPTED: 1115 case AUTO_ACCEPT_ACCEPTED:
1126 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_ACCEPTED); 1116 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_ACCEPTED);
1127 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_WITH_DEFAULTS); 1117 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_WITH_DEFAULTS);
1128 SigninManager::DisableOneClickSignIn(profile); 1118 SigninManager::DisableOneClickSignIn(profile);
1129 browser->window()->ShowOneClickSigninBubble( 1119 browser->window()->ShowOneClickSigninBubble(
1130 bubble_type, 1120 BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG,
1131 UTF8ToUTF16(email_), 1121 UTF8ToUTF16(email_),
1132 string16(), /* no error message to display */ 1122 string16(), /* no error message to display */
1133 base::Bind(&StartSync, 1123 base::Bind(&StartSync,
1134 StartSyncArgs(profile, browser, auto_accept_, 1124 StartSyncArgs(profile, browser, auto_accept_,
1135 session_index_, email_, password_, 1125 session_index_, email_, password_,
1136 false /* force_same_tab_navigation */, 1126 false /* force_same_tab_navigation */,
1137 confirmation_required_))); 1127 confirmation_required_)));
1138 break; 1128 break;
1139 case AUTO_ACCEPT_CONFIGURE: 1129 case AUTO_ACCEPT_CONFIGURE:
1140 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_ACCEPTED); 1130 LogOneClickHistogramValue(one_click_signin::HISTOGRAM_ACCEPTED);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 } 1272 }
1283 } 1273 }
1284 ShowSyncConfirmationBubble(display_bubble); 1274 ShowSyncConfirmationBubble(display_bubble);
1285 signin_tracker_.reset(); 1275 signin_tracker_.reset();
1286 } 1276 }
1287 1277
1288 void OneClickSigninHelper::SigninSuccess() { 1278 void OneClickSigninHelper::SigninSuccess() {
1289 ShowSyncConfirmationBubble(true); 1279 ShowSyncConfirmationBubble(true);
1290 signin_tracker_.reset(); 1280 signin_tracker_.reset();
1291 } 1281 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698