OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/signin/signin_global_error.h" | 5 #include "chrome/browser/signin/signin_global_error.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 LoginUIService* login_ui = LoginUIServiceFactory::GetForProfile(profile_); | 91 LoginUIService* login_ui = LoginUIServiceFactory::GetForProfile(profile_); |
92 if (login_ui->current_login_ui()) { | 92 if (login_ui->current_login_ui()) { |
93 login_ui->current_login_ui()->FocusUI(); | 93 login_ui->current_login_ui()->FocusUI(); |
94 return; | 94 return; |
95 } | 95 } |
96 | 96 |
97 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", | 97 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", |
98 signin_metrics::HISTOGRAM_REAUTH_SHOWN, | 98 signin_metrics::HISTOGRAM_REAUTH_SHOWN, |
99 signin_metrics::HISTOGRAM_REAUTH_MAX); | 99 signin_metrics::HISTOGRAM_REAUTH_MAX); |
100 browser->window()->ShowAvatarBubbleFromAvatarButton( | 100 browser->window()->ShowAvatarBubbleFromAvatarButton( |
101 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, | 101 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, signin::ManageAccountsParams(), |
102 signin::ManageAccountsParams()); | 102 signin_metrics::AccessPoint::ACCESS_POINT_MENU); |
103 #endif | 103 #endif |
104 } | 104 } |
105 | 105 |
106 bool SigninGlobalError::HasBubbleView() { | 106 bool SigninGlobalError::HasBubbleView() { |
107 return !GetBubbleViewMessages().empty(); | 107 return !GetBubbleViewMessages().empty(); |
108 } | 108 } |
109 | 109 |
110 base::string16 SigninGlobalError::GetBubbleViewTitle() { | 110 base::string16 SigninGlobalError::GetBubbleViewTitle() { |
111 return l10n_util::GetStringUTF16(IDS_SIGNIN_ERROR_BUBBLE_VIEW_TITLE); | 111 return l10n_util::GetStringUTF16(IDS_SIGNIN_ERROR_BUBBLE_VIEW_TITLE); |
112 } | 112 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 ExecuteMenuItem(browser); | 172 ExecuteMenuItem(browser); |
173 } | 173 } |
174 | 174 |
175 void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) { | 175 void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) { |
176 NOTREACHED(); | 176 NOTREACHED(); |
177 } | 177 } |
178 | 178 |
179 void SigninGlobalError::OnErrorChanged() { | 179 void SigninGlobalError::OnErrorChanged() { |
180 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this); | 180 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this); |
181 } | 181 } |
OLD | NEW |