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

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

Issue 1094103005: Profile chooser on mac was passing wrong value to signin error controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 7 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
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/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // positive. This happens when the user types one email address in the 635 // positive. This happens when the user types one email address in the
636 // gaia sign in page, but signs in to a different account in the SAML sign in 636 // gaia sign in page, but signs in to a different account in the SAML sign in
637 // page. 637 // page.
638 std::string default_email; 638 std::string default_email;
639 std::string validate_email; 639 std::string validate_email;
640 if (net::GetValueForKeyInQuery(current_url, "email", &default_email) && 640 if (net::GetValueForKeyInQuery(current_url, "email", &default_email) &&
641 net::GetValueForKeyInQuery(current_url, "validateEmail", 641 net::GetValueForKeyInQuery(current_url, "validateEmail",
642 &validate_email) && 642 &validate_email) &&
643 validate_email == "1") { 643 validate_email == "1") {
644 if (!gaia::AreEmailsSame(email, default_email)) { 644 if (!gaia::AreEmailsSame(email, default_email)) {
645 SyncStarterCallback(OneClickSigninSyncStarter::SYNC_SETUP_FAILURE); 645 HandleLoginError(
646 l10n_util::GetStringFUTF8(IDS_SYNC_WRONG_EMAIL,
647 base::UTF8ToUTF16(default_email)));
646 return; 648 return;
647 } 649 }
648 } 650 }
649 651
650 base::string16 session_index_string16; 652 base::string16 session_index_string16;
651 dict->GetString("sessionIndex", &session_index_string16); 653 dict->GetString("sessionIndex", &session_index_string16);
652 std::string session_index = base::UTF16ToASCII(session_index_string16); 654 std::string session_index = base::UTF16ToASCII(session_index_string16);
653 DCHECK(!session_index.empty()); 655 DCHECK(!session_index.empty());
654 656
655 bool choose_what_to_sync = false; 657 bool choose_what_to_sync = false;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 } 774 }
773 } 775 }
774 776
775 if (show_account_management) { 777 if (show_account_management) {
776 browser->window()->ShowAvatarBubbleFromAvatarButton( 778 browser->window()->ShowAvatarBubbleFromAvatarButton(
777 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 779 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
778 signin::ManageAccountsParams()); 780 signin::ManageAccountsParams());
779 } 781 }
780 } 782 }
781 } 783 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698