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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 444083003: Fix crash when new avatar signin with cross account error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698