Chromium Code Reviews| 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(¶ms); |
| + } |
| } 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. |