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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required = | 155 OneClickSigninSyncStarter::ConfirmationRequired confirmation_required = |
156 source == signin::SOURCE_SETTINGS || | 156 source == signin::SOURCE_SETTINGS || |
157 source == signin::SOURCE_WEBSTORE_INSTALL || | 157 source == signin::SOURCE_WEBSTORE_INSTALL || |
158 choose_what_to_sync_ || | 158 choose_what_to_sync_ || |
159 show_inline_confirmation_for_sync ? | 159 show_inline_confirmation_for_sync ? |
160 OneClickSigninSyncStarter::NO_CONFIRMATION : | 160 OneClickSigninSyncStarter::NO_CONFIRMATION : |
161 OneClickSigninSyncStarter::CONFIRM_AFTER_SIGNIN; | 161 OneClickSigninSyncStarter::CONFIRM_AFTER_SIGNIN; |
162 bool start_signin = | 162 bool start_signin = |
163 !OneClickSigninHelper::HandleCrossAccountError( | 163 !OneClickSigninHelper::HandleCrossAccountError( |
164 contents, "", | 164 profile_, "", |
165 email, password_, refresh_token, | 165 email, password_, refresh_token, |
166 OneClickSigninHelper::AUTO_ACCEPT_EXPLICIT, | 166 OneClickSigninHelper::AUTO_ACCEPT_EXPLICIT, |
167 source, start_mode, | 167 source, start_mode, |
168 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, | 168 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, |
169 handler_)); | 169 handler_)); |
170 if (start_signin) { | 170 if (start_signin) { |
171 // Call OneClickSigninSyncStarter to exchange oauth code for tokens. | 171 // Call OneClickSigninSyncStarter to exchange oauth code for tokens. |
172 // OneClickSigninSyncStarter will delete itself once the job is done. | 172 // OneClickSigninSyncStarter will delete itself once the job is done. |
173 new OneClickSigninSyncStarter( | 173 new OneClickSigninSyncStarter( |
174 profile_, browser, | 174 profile_, browser, |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 } | 403 } |
404 } | 404 } |
405 | 405 |
406 if (show_account_management) { | 406 if (show_account_management) { |
407 browser->window()->ShowAvatarBubbleFromAvatarButton( | 407 browser->window()->ShowAvatarBubbleFromAvatarButton( |
408 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 408 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
409 signin::ManageAccountsParams()); | 409 signin::ManageAccountsParams()); |
410 } | 410 } |
411 } | 411 } |
412 } | 412 } |
OLD | NEW |