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

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

Issue 2351173004: Display local signin error without browser and record the path of selected profile in user manager. (Closed)
Patch Set: Created 4 years, 3 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/user_manager_screen_handler.h" 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 GetURLRequestContext())); 462 GetURLRequestContext()));
463 } 463 }
464 464
465 const std::string token = entry->GetPasswordChangeDetectionToken(); 465 const std::string token = entry->GetPasswordChangeDetectionToken();
466 if (!token.empty()) { 466 if (!token.empty()) {
467 oauth_client_->GetTokenHandleInfo(token, kMaxOAuthRetries, this); 467 oauth_client_->GetTokenHandleInfo(token, kMaxOAuthRetries, this);
468 return; 468 return;
469 } 469 }
470 } 470 }
471 471
472 // In order to support the upgrade case where we have a local hash but no 472 content::BrowserContext* browser_context =
473 // password token, the user perform a full online reauth. 473 web_ui()->GetWebContents()->GetBrowserContext();
474 UserManager::ShowReauthDialog(web_ui()->GetWebContents()->GetBrowserContext(), 474 if (!email_address_.empty()) {
475 email_address_, 475 // In order to support the upgrade case where we have a local hash but no
476 signin_metrics::Reason::REASON_UNLOCK); 476 // password token, the user perform a full online reauth.
477 UserManager::ShowReauthDialog(browser_context, email_address_,
478 signin_metrics::Reason::REASON_UNLOCK);
479 } else {
480 // Fresh sign in via user manager without existed email address.
481 UserManager::ShowSigninDialog(browser_context, profile_path);
482 }
477 } 483 }
478 484
479 void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) { 485 void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) {
480 DCHECK(args); 486 DCHECK(args);
481 const base::Value* profile_path_value; 487 const base::Value* profile_path_value;
482 if (!args->Get(0, &profile_path_value)) { 488 if (!args->Get(0, &profile_path_value)) {
483 NOTREACHED(); 489 NOTREACHED();
484 return; 490 return;
485 } 491 }
486 492
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 Profile* profile, Profile::CreateStatus profile_create_status) { 1045 Profile* profile, Profile::CreateStatus profile_create_status) {
1040 Browser* browser = chrome::FindAnyBrowser(profile, false); 1046 Browser* browser = chrome::FindAnyBrowser(profile, false);
1041 if (browser && browser->window()) { 1047 if (browser && browser->window()) {
1042 OnBrowserWindowReady(browser); 1048 OnBrowserWindowReady(browser);
1043 } else { 1049 } else {
1044 registrar_.Add(this, 1050 registrar_.Add(this,
1045 chrome::NOTIFICATION_BROWSER_WINDOW_READY, 1051 chrome::NOTIFICATION_BROWSER_WINDOW_READY,
1046 content::NotificationService::AllSources()); 1052 content::NotificationService::AllSources());
1047 } 1053 }
1048 } 1054 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698