Chromium Code Reviews| 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/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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 content::BrowserContext* browser_context = | 472 content::BrowserContext* browser_context = |
| 473 web_ui()->GetWebContents()->GetBrowserContext(); | 473 web_ui()->GetWebContents()->GetBrowserContext(); |
| 474 | 474 |
| 475 // In order to support the upgrade case where we have a local hash but no | |
| 476 // password token, the user perform a full online reauth. | |
| 477 // TODO(zmin): Remove the condition for MACOSX once user_manager_mac.cc is | |
| 478 // updated. | |
| 479 #if !defined(OS_MACOSX) | |
| 480 if (!email_address_.empty()) { | 475 if (!email_address_.empty()) { |
| 476 // In order to support the upgrade case where we have a local hash but no | |
| 477 // password token, the user perform a full online reauth. | |
|
michaelpg
2016/10/14 15:46:31
grammar: "have the user perform" or "the user must
zmin
2016/10/14 16:03:21
Done.
| |
| 481 UserManager::ShowReauthDialog(browser_context, email_address_, | 478 UserManager::ShowReauthDialog(browser_context, email_address_, |
| 482 signin_metrics::Reason::REASON_UNLOCK); | 479 signin_metrics::Reason::REASON_UNLOCK); |
| 483 } else { | 480 } else { |
| 484 // Fresh sign in via user manager without existing email address. | 481 // Fresh sign in via user manager without existing email address. |
| 485 UserManager::ShowSigninDialog(browser_context, profile_path); | 482 UserManager::ShowSigninDialog(browser_context, profile_path); |
| 486 } | 483 } |
| 487 #else | |
| 488 UserManager::ShowReauthDialog(browser_context, email_address_, | |
| 489 signin_metrics::Reason::REASON_UNLOCK); | |
| 490 #endif | |
| 491 } | 484 } |
| 492 | 485 |
| 493 void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) { | 486 void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) { |
| 494 DCHECK(args); | 487 DCHECK(args); |
| 495 const base::Value* profile_path_value; | 488 const base::Value* profile_path_value; |
| 496 if (!args->Get(0, &profile_path_value)) { | 489 if (!args->Get(0, &profile_path_value)) { |
| 497 NOTREACHED(); | 490 NOTREACHED(); |
| 498 return; | 491 return; |
| 499 } | 492 } |
| 500 | 493 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1053 Profile* profile, Profile::CreateStatus profile_create_status) { | 1046 Profile* profile, Profile::CreateStatus profile_create_status) { |
| 1054 Browser* browser = chrome::FindAnyBrowser(profile, false); | 1047 Browser* browser = chrome::FindAnyBrowser(profile, false); |
| 1055 if (browser && browser->window()) { | 1048 if (browser && browser->window()) { |
| 1056 OnBrowserWindowReady(browser); | 1049 OnBrowserWindowReady(browser); |
| 1057 } else { | 1050 } else { |
| 1058 registrar_.Add(this, | 1051 registrar_.Add(this, |
| 1059 chrome::NOTIFICATION_BROWSER_WINDOW_READY, | 1052 chrome::NOTIFICATION_BROWSER_WINDOW_READY, |
| 1060 content::NotificationService::AllSources()); | 1053 content::NotificationService::AllSources()); |
| 1061 } | 1054 } |
| 1062 } | 1055 } |
| OLD | NEW |