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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.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: 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 unified diff | Download patch | Annotate | Revision Log
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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1180
1181 // No need to display a second confirmation so pass false below. 1181 // No need to display a second confirmation so pass false below.
1182 // TODO(atwilson): Move this into OneClickSigninSyncStarter. 1182 // TODO(atwilson): Move this into OneClickSigninSyncStarter.
1183 // The tab modal dialog always executes its callback before |contents| 1183 // The tab modal dialog always executes its callback before |contents|
1184 // is deleted. 1184 // is deleted.
1185 Browser* browser = chrome::FindLastActiveWithProfile( 1185 Browser* browser = chrome::FindLastActiveWithProfile(
1186 profile, chrome::GetActiveDesktop()); 1186 profile, chrome::GetActiveDesktop());
1187 content::WebContents* contents = 1187 content::WebContents* contents =
1188 browser->tab_strip_model()->GetActiveWebContents(); 1188 browser->tab_strip_model()->GetActiveWebContents();
1189 1189
1190 // If the user signs in from the new avatar bubble, the confirm email dialog
1191 // would dismiss the avatar bubble, thus it won't show any confirmation upon
1192 // sign in completes. This confirmation dialog already mentions that user
1193 // data would be synced, thus we just start sync immediately.
1194 // TODO(guohui): add a sync settings link to allow user to configure sync
1195 // settings before sync starts.
1196 if (start_mode == OneClickSigninSyncStarter::CONFIRM_SYNC_SETTINGS_FIRST)
1197 start_mode = OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS;
1198
1199 ConfirmEmailDialogDelegate::AskForConfirmation( 1190 ConfirmEmailDialogDelegate::AskForConfirmation(
1200 contents, 1191 contents,
1201 last_email, 1192 last_email,
1202 email, 1193 email,
1203 base::Bind( 1194 base::Bind(
1204 &StartExplicitSync, 1195 &StartExplicitSync,
1205 StartSyncArgs(profile, browser, auto_accept, 1196 StartSyncArgs(profile, browser, auto_accept,
1206 session_index, email, password, 1197 session_index, email, password,
1207 refresh_token, 1198 refresh_token,
1208 contents, false /* confirmation_required */, source, 1199 contents, false /* confirmation_required */, source,
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 // If the web contents is showing a blank page and not about to be closed, 1614 // If the web contents is showing a blank page and not about to be closed,
1624 // redirect to the NTP or apps page. 1615 // redirect to the NTP or apps page.
1625 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && 1616 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) &&
1626 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { 1617 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) {
1627 RedirectToNtpOrAppsPage( 1618 RedirectToNtpOrAppsPage(
1628 web_contents(), 1619 web_contents(),
1629 signin::GetSourceForPromoURL(original_continue_url_)); 1620 signin::GetSourceForPromoURL(original_continue_url_));
1630 } 1621 }
1631 } 1622 }
1632 } 1623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698