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

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

Issue 17482002: Display confirmation dialog for untrusted signins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix whitespace Created 7 years, 6 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 | « chrome/browser/ui/sync/one_click_signin_sync_starter.h ('k') | chrome/browser/ui/webui/inline_login_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_sync_starter.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index b05a72763627645bfc89a05ee9509621b12456c6..5a900476f880934bd5a20e89bd8c29aae7c00812 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -48,10 +48,12 @@ OneClickSigninSyncStarter::OneClickSigninSyncStarter(
const std::string& password,
StartSyncMode start_mode,
bool force_same_tab_navigation,
- ConfirmationRequired confirmation_required)
+ ConfirmationRequired confirmation_required,
+ SyncPromoUI::Source source)
: start_mode_(start_mode),
force_same_tab_navigation_(force_same_tab_navigation),
confirmation_required_(confirmation_required),
+ source_(source),
weak_pointer_factory_(this) {
DCHECK(profile);
BrowserList::AddObserver(this);
@@ -312,6 +314,15 @@ void OneClickSigninSyncStarter::UntrustedSigninConfirmed(
StartSyncMode response) {
if (response == UNDO_SYNC) {
CancelSigninAndDelete();
+ // If this was not an interstitial signin, (i.e. it was a SAML signin)
+ // then the browser page is now blank and should redirect to the NTP.
+ if (source_ != SyncPromoUI::SOURCE_UNKNOWN) {
+ chrome::NavigateParams params(browser_, GURL(chrome::kChromeUINewTabURL),
Roger Tawa OOO till Jul 10th 2013/06/21 17:06:22 I wonder if you should call EnsureBrowser() here,
noms (inactive) 2013/06/21 17:21:20 Done.
+ content::PAGE_TRANSITION_AUTO_TOPLEVEL);
+ params.disposition = CURRENT_TAB;
+ params.window_action = chrome::NavigateParams::SHOW_WINDOW;
+ chrome::Navigate(&params);
+ }
} else {
// If the user clicked the "Advanced" link in the confirmation dialog, then
// override the current start_mode_ to bring up the advanced sync settings.
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.h ('k') | chrome/browser/ui/webui/inline_login_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698