| 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 ac9597eddb354b76837c66f00a1a2221ba6660c6..8002692bc8ee8d8cc2fa677a953207dde90656dd 100644
|
| --- a/chrome/browser/ui/sync/one_click_signin_helper.cc
|
| +++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
|
| @@ -726,7 +726,9 @@ void OneClickSigninHelper::DidStopLoading(
|
| break;
|
| case AUTO_ACCEPT_EXPLICIT:
|
| StartSync(browser, auto_accept_, session_index_, email_, password_,
|
| - OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS);
|
| + source_ == SyncPromoUI::SOURCE_SETTINGS ?
|
| + OneClickSigninSyncStarter::SIGNIN_ONLY :
|
| + OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS);
|
| break;
|
| case REJECTED_FOR_PROFILE:
|
| UMA_HISTOGRAM_ENUMERATION("AutoLogin.Reverse",
|
| @@ -738,30 +740,20 @@ void OneClickSigninHelper::DidStopLoading(
|
| break;
|
| }
|
|
|
| - AutoAccept local_auto_accept = auto_accept_;
|
| - SyncPromoUI::Source local_source = source_;
|
| + // If this explicit sign in is not from settings page, show the NTP after
|
| + // sign in completes. In the case of the settings page, it will get closed
|
| + // by SyncSetupHandler.
|
| + if (auto_accept_ == AUTO_ACCEPT_EXPLICIT &&
|
| + source_ != SyncPromoUI::SOURCE_SETTINGS) {
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(contents->GetBrowserContext());
|
| + signin_tracker_.reset(new SigninTracker(profile, this));
|
| + }
|
|
|
| email_.clear();
|
| password_.clear();
|
| auto_accept_ = NO_AUTO_ACCEPT;
|
| source_ = SyncPromoUI::SOURCE_UNKNOWN;
|
| -
|
| - // If this is an explicit sign in by the user, then redirect them to the
|
| - // NTP.
|
| - if (local_auto_accept == AUTO_ACCEPT_EXPLICIT) {
|
| - // If this is an explicit sign in from settings page, then close the
|
| - // tab. Otherwise show the NTP after sign in completes.
|
| - if (local_source == SyncPromoUI::SOURCE_SETTINGS) {
|
| - contents->Close();
|
| - } else {
|
| - Profile* profile =
|
| - Profile::FromBrowserContext(contents->GetBrowserContext());
|
| - signin_tracker_.reset(new SigninTracker(profile, this));
|
| - }
|
| - }
|
| -
|
| - // |this| may have been deleted due to the contents->Close() call above.
|
| - // No members should be accessed at this point.
|
| }
|
|
|
| void OneClickSigninHelper::GaiaCredentialsValid() {
|
|
|