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/sync/sync_global_error.h" | 5 #include "chrome/browser/sync/sync_global_error.h" |
6 | 6 |
7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/sync/profile_sync_service.h" | 8 #include "chrome/browser/sync/profile_sync_service.h" |
9 #include "chrome/browser/sync/sync_ui_util.h" | 9 #include "chrome/browser/sync/sync_ui_util.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
12 #include "chrome/browser/ui/chrome_pages.h" | 12 #include "chrome/browser/ui/chrome_pages.h" |
13 #include "chrome/browser/ui/global_error/global_error_service.h" | 13 #include "chrome/browser/ui/global_error/global_error_service.h" |
14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
15 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 15 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
16 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 16 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
17 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 18 #include "chrome/grit/generated_resources.h" |
18 #include "google_apis/gaia/google_service_auth_error.h" | 19 #include "google_apis/gaia/google_service_auth_error.h" |
19 #include "grit/generated_resources.h" | |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 | 21 |
22 SyncGlobalError::SyncGlobalError(SyncErrorController* error_controller, | 22 SyncGlobalError::SyncGlobalError(SyncErrorController* error_controller, |
23 ProfileSyncService* profile_sync_service) | 23 ProfileSyncService* profile_sync_service) |
24 : error_controller_(error_controller), | 24 : error_controller_(error_controller), |
25 service_(profile_sync_service) { | 25 service_(profile_sync_service) { |
26 DCHECK(service_); | 26 DCHECK(service_); |
27 error_controller_->AddObserver(this); | 27 error_controller_->AddObserver(this); |
28 GlobalErrorServiceFactory::GetForProfile(service_->profile())-> | 28 GlobalErrorServiceFactory::GetForProfile(service_->profile())-> |
29 AddGlobalError(this); | 29 AddGlobalError(this); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 bubble_accept_label_ = bubble_accept_label; | 115 bubble_accept_label_ = bubble_accept_label; |
116 | 116 |
117 // Profile can be NULL during tests. | 117 // Profile can be NULL during tests. |
118 Profile* profile = service_->profile(); | 118 Profile* profile = service_->profile(); |
119 if (profile) { | 119 if (profile) { |
120 GlobalErrorServiceFactory::GetForProfile( | 120 GlobalErrorServiceFactory::GetForProfile( |
121 profile)->NotifyErrorsChanged(this); | 121 profile)->NotifyErrorsChanged(this); |
122 } | 122 } |
123 } | 123 } |
124 } | 124 } |
OLD | NEW |