| 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/profile_sync_service_observer.h" | 9 #include "chrome/browser/sync/profile_sync_service_observer.h" |
| 10 #include "chrome/browser/sync/sync_ui_util.h" | 10 #include "chrome/browser/sync/sync_ui_util.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_commands.h" | 12 #include "chrome/browser/ui/browser_commands.h" |
| 13 #include "chrome/browser/ui/chrome_pages.h" | 13 #include "chrome/browser/ui/chrome_pages.h" |
| 14 #include "chrome/browser/ui/global_error/global_error_service.h" | 14 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 15 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 15 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 16 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 16 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 17 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 17 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "google_apis/gaia/google_service_auth_error.h" | 19 #include "google_apis/gaia/google_service_auth_error.h" |
| 20 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 23 | 23 |
| 24 SyncGlobalError::SyncGlobalError(ProfileSyncService* service, | 24 SyncGlobalError::SyncGlobalError(ProfileSyncService* service, |
| 25 SigninManager* signin) | 25 SigninManagerBase* signin) |
| 26 : service_(service), | 26 : service_(service), |
| 27 signin_(signin) { | 27 signin_(signin) { |
| 28 DCHECK(service_); | 28 DCHECK(service_); |
| 29 DCHECK(signin_); | 29 DCHECK(signin_); |
| 30 OnStateChanged(); | 30 OnStateChanged(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 SyncGlobalError::~SyncGlobalError() { | 33 SyncGlobalError::~SyncGlobalError() { |
| 34 } | 34 } |
| 35 | 35 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 bubble_accept_label_ = bubble_accept_label; | 107 bubble_accept_label_ = bubble_accept_label; |
| 108 | 108 |
| 109 // Profile can be NULL during tests. | 109 // Profile can be NULL during tests. |
| 110 Profile* profile = service_->profile(); | 110 Profile* profile = service_->profile(); |
| 111 if (profile) { | 111 if (profile) { |
| 112 GlobalErrorServiceFactory::GetForProfile( | 112 GlobalErrorServiceFactory::GetForProfile( |
| 113 profile)->NotifyErrorsChanged(this); | 113 profile)->NotifyErrorsChanged(this); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 } | 116 } |
| OLD | NEW |