OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/webui/signin/inline_login_handler_impl.h" | 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 if (start_signin) { | 149 if (start_signin) { |
150 // Call OneClickSigninSyncStarter to exchange oauth code for tokens. | 150 // Call OneClickSigninSyncStarter to exchange oauth code for tokens. |
151 // OneClickSigninSyncStarter will delete itself once the job is done. | 151 // OneClickSigninSyncStarter will delete itself once the job is done. |
152 new OneClickSigninSyncStarter( | 152 new OneClickSigninSyncStarter( |
153 profile_, browser, | 153 profile_, browser, |
154 email, password_, refresh_token, | 154 email, password_, refresh_token, |
155 start_mode, | 155 start_mode, |
156 contents, | 156 contents, |
157 confirmation_required, | 157 confirmation_required, |
| 158 signin::GetNextPageURLForPromoURL(current_url_), |
158 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_)); | 159 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_)); |
159 } | 160 } |
160 } | 161 } |
161 | 162 |
162 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 163 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
163 } | 164 } |
164 | 165 |
165 void InlineSigninHelper::OnSigninOAuthInformationFailure( | 166 void InlineSigninHelper::OnSigninOAuthInformationFailure( |
166 const GoogleServiceAuthError& error) { | 167 const GoogleServiceAuthError& error) { |
167 if (handler_) | 168 if (handler_) |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 TabStripModel* tab_strip_model = browser->tab_strip_model(); | 411 TabStripModel* tab_strip_model = browser->tab_strip_model(); |
411 if (tab_strip_model) { | 412 if (tab_strip_model) { |
412 int index = tab_strip_model->GetIndexOfWebContents(tab); | 413 int index = tab_strip_model->GetIndexOfWebContents(tab); |
413 if (index != TabStripModel::kNoTab) { | 414 if (index != TabStripModel::kNoTab) { |
414 tab_strip_model->ExecuteContextMenuCommand( | 415 tab_strip_model->ExecuteContextMenuCommand( |
415 index, TabStripModel::CommandCloseTab); | 416 index, TabStripModel::CommandCloseTab); |
416 } | 417 } |
417 } | 418 } |
418 } | 419 } |
419 } | 420 } |
OLD | NEW |