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

Unified Diff: chrome/browser/ui/webui/signin/login_ui_service.cc

Issue 2255413002: [Signin Error Dialog] (3/3) Added the triggering code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Broke down the CL Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/login_ui_service.cc
diff --git a/chrome/browser/ui/webui/signin/login_ui_service.cc b/chrome/browser/ui/webui/signin/login_ui_service.cc
index 03c61952c9646a0fbc168c361ca5b92d682b03fc..aca0f399e1a83c558a1ba6652f9bd8bcd4bef045 100644
--- a/chrome/browser/ui/webui/signin/login_ui_service.cc
+++ b/chrome/browser/ui/webui/signin/login_ui_service.cc
@@ -66,17 +66,23 @@ void LoginUIService::ShowLoginPopup() {
}
void LoginUIService::DisplayLoginResult(Browser* browser,
- const base::string16& message) {
+ const base::string16& error_message,
+ const base::string16& email) {
#if defined(OS_CHROMEOS)
// ChromeOS doesn't have the avatar bubble so it never calls this function.
NOTREACHED();
#endif
- last_login_result_ = message;
- browser->window()->ShowAvatarBubbleFromAvatarButton(
- message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN
- : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR,
- signin::ManageAccountsParams(),
- signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS);
+ last_login_result_ = error_message;
+ last_login_error_email_ = email;
+ if (switches::IsMaterialDesignUserMenu() && !error_message.empty()) {
+ browser->ShowModalSigninErrorWindow();
+ } else {
+ browser->window()->ShowAvatarBubbleFromAvatarButton(
+ error_message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN
+ : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR,
+ signin::ManageAccountsParams(),
+ signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS);
+ }
}
const base::string16& LoginUIService::GetLastLoginResult() {
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698