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 "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/profiles/profile_info_cache.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/signin/signin_header_helper.h" | 13 #include "chrome/browser/signin/signin_header_helper.h" |
11 #include "chrome/browser/signin/signin_manager_factory.h" | 14 #include "chrome/browser/signin/signin_manager_factory.h" |
12 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
13 #include "chrome/browser/ui/browser_window.h" | 16 #include "chrome/browser/ui/browser_window.h" |
14 #include "chrome/browser/ui/chrome_pages.h" | 17 #include "chrome/browser/ui/chrome_pages.h" |
15 #include "chrome/browser/ui/global_error/global_error_service.h" | 18 #include "chrome/browser/ui/global_error/global_error_service.h" |
16 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 19 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
17 #include "chrome/browser/ui/singleton_tabs.h" | 20 #include "chrome/browser/ui/singleton_tabs.h" |
18 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 21 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
19 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 22 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void SigninGlobalError::BubbleViewAcceptButtonPressed(Browser* browser) { | 184 void SigninGlobalError::BubbleViewAcceptButtonPressed(Browser* browser) { |
182 ExecuteMenuItem(browser); | 185 ExecuteMenuItem(browser); |
183 } | 186 } |
184 | 187 |
185 void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) { | 188 void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) { |
186 NOTREACHED(); | 189 NOTREACHED(); |
187 } | 190 } |
188 | 191 |
189 void SigninGlobalError::OnErrorChanged() { | 192 void SigninGlobalError::OnErrorChanged() { |
190 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this); | 193 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this); |
| 194 |
| 195 ProfileInfoCache& cache = g_browser_process->profile_manager()-> |
| 196 GetProfileInfoCache(); |
| 197 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
| 198 if (index != std::string::npos) { |
| 199 cache.SetProfileAuthErrorAtIndex(index, |
| 200 error_controller_->auth_error().state()); |
| 201 } |
191 } | 202 } |
OLD | NEW |