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

Unified 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: cr+fix trybot 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index a56bbe86f0f4b62d786d9c086bb32c4b41c3cbb3..f19545ff63e063240d2e745226b25dcf113e0ab6 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -469,12 +469,24 @@ void UserManagerScreenHandler::HandleAuthenticatedLaunchUser(
}
}
- // In order to support the upgrade case where we have a local hash but no
- // password token, the user perform a full online reauth.
- UserManager::ShowReauthDialog(web_ui()->GetWebContents()->GetBrowserContext(),
- email_address_,
- signin_metrics::Reason::REASON_UNLOCK);
+ content::BrowserContext* browser_context =
+ web_ui()->GetWebContents()->GetBrowserContext();
+
+#if !defined(OS_MACOSX)
tommycli 2016/09/21 18:26:59 Why the mac vs. non-mac distinction? Also the non
zmin 2016/09/21 21:21:37 Because the user_manager implementation on Mac is
tommycli 2016/09/21 21:26:16 Okay that's fine, please add a TODO for yourself e
zmin 2016/09/21 21:52:05 Done.
+ if (!email_address_.empty()) {
+ // In order to support the upgrade case where we have a local hash but no
+ // password token, the user perform a full online reauth.
+ UserManager::ShowReauthDialog(browser_context, email_address_,
+ signin_metrics::Reason::REASON_UNLOCK);
+ } else {
+ // Fresh sign in via user manager without existed email address.
+ UserManager::ShowSigninDialog(browser_context, profile_path);
+ }
}
+#else
+ UserManager::ShowReauthDialog(browser_context, email_address_,
+ signin_metrics::Reason::REASON_UNLOCK);
+#endif
void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) {
DCHECK(args);

Powered by Google App Engine
This is Rietveld 408576698