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 "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/signin/signin_promo.h" | 8 #include "chrome/browser/signin/signin_promo.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 void LoginUIService::ShowLoginPopup() { | 63 void LoginUIService::ShowLoginPopup() { |
64 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
65 if (chrome::IsRunningInForcedAppMode()) | 65 if (chrome::IsRunningInForcedAppMode()) |
66 InlineLoginDialog::Show(profile_); | 66 InlineLoginDialog::Show(profile_); |
67 #else | 67 #else |
68 chrome::ScopedTabbedBrowserDisplayer displayer( | 68 chrome::ScopedTabbedBrowserDisplayer displayer( |
69 profile_, chrome::GetActiveDesktop()); | 69 profile_, chrome::GetActiveDesktop()); |
70 chrome::ShowBrowserSignin( | 70 chrome::ShowBrowserSignin( |
71 displayer.browser(), signin_metrics::SOURCE_APP_LAUNCHER); | 71 displayer.browser(), |
| 72 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS); |
72 #endif | 73 #endif |
73 } | 74 } |
74 | 75 |
75 void LoginUIService::DisplayLoginResult(Browser* browser, | 76 void LoginUIService::DisplayLoginResult(Browser* browser, |
76 const base::string16& message) { | 77 const base::string16& message) { |
77 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
78 // ChromeOS doesn't have the avatar bubble so it never calls this function. | 79 // ChromeOS doesn't have the avatar bubble so it never calls this function. |
79 NOTREACHED(); | 80 NOTREACHED(); |
80 #endif | 81 #endif |
81 last_login_result_ = message; | 82 last_login_result_ = message; |
82 browser->window()->ShowAvatarBubbleFromAvatarButton( | 83 browser->window()->ShowAvatarBubbleFromAvatarButton( |
83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN : | 84 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN |
84 BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, | 85 : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, |
85 signin::ManageAccountsParams()); | 86 signin::ManageAccountsParams(), |
| 87 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS); |
86 } | 88 } |
87 | 89 |
88 const base::string16& LoginUIService::GetLastLoginResult() { | 90 const base::string16& LoginUIService::GetLastLoginResult() { |
89 return last_login_result_; | 91 return last_login_result_; |
90 } | 92 } |
OLD | NEW |