| OLD | NEW | 
|   1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2012 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/login_ui_service.h" |   5 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 
|   6  |   6  | 
|   7 #include "build/build_config.h" |   7 #include "build/build_config.h" | 
|   8 #include "chrome/browser/profiles/profile.h" |   8 #include "chrome/browser/profiles/profile.h" | 
|   9 #include "chrome/browser/signin/signin_promo.h" |   9 #include "chrome/browser/signin/signin_promo.h" | 
|  10 #include "chrome/browser/ui/browser.h" |  10 #include "chrome/browser/ui/browser.h" | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  70 #if defined(OS_CHROMEOS) |  70 #if defined(OS_CHROMEOS) | 
|  71   // ChromeOS doesn't have the avatar bubble so it never calls this function. |  71   // ChromeOS doesn't have the avatar bubble so it never calls this function. | 
|  72   NOTREACHED(); |  72   NOTREACHED(); | 
|  73 #endif |  73 #endif | 
|  74   last_login_result_ = error_message; |  74   last_login_result_ = error_message; | 
|  75   last_login_error_email_ = email; |  75   last_login_error_email_ = email; | 
|  76   if (switches::IsMaterialDesignUserMenu() && !error_message.empty()) { |  76   if (switches::IsMaterialDesignUserMenu() && !error_message.empty()) { | 
|  77     if (browser) |  77     if (browser) | 
|  78       browser->ShowModalSigninErrorWindow(); |  78       browser->ShowModalSigninErrorWindow(); | 
|  79     else |  79     else | 
|  80       UserManager::DisplayErrorMessage(); |  80       UserManagerDialog::DisplayErrorMessage(); | 
|  81   } else if (browser) { |  81   } else if (browser) { | 
|  82     browser->window()->ShowAvatarBubbleFromAvatarButton( |  82     browser->window()->ShowAvatarBubbleFromAvatarButton( | 
|  83         error_message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN |  83         error_message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN | 
|  84                               : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, |  84                               : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, | 
|  85         signin::ManageAccountsParams(), |  85         signin::ManageAccountsParams(), | 
|  86         signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS); |  86         signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS); | 
|  87   } |  87   } | 
|  88 } |  88 } | 
|  89  |  89  | 
|  90 const base::string16& LoginUIService::GetLastLoginResult() const { |  90 const base::string16& LoginUIService::GetLastLoginResult() const { | 
|  91   return last_login_result_; |  91   return last_login_result_; | 
|  92 } |  92 } | 
|  93  |  93  | 
|  94 const base::string16& LoginUIService::GetLastLoginErrorEmail() const { |  94 const base::string16& LoginUIService::GetLastLoginErrorEmail() const { | 
|  95   return last_login_error_email_; |  95   return last_login_error_email_; | 
|  96 } |  96 } | 
| OLD | NEW |