| Index: chrome/browser/sync/sync_global_error.cc
|
| diff --git a/chrome/browser/sync/sync_global_error.cc b/chrome/browser/sync/sync_global_error.cc
|
| index b4988eb0d23c31f4ddd49f6176725ebf291304a3..909529c2793636699d60bbef7047cfc6c2ad99ac 100644
|
| --- a/chrome/browser/sync/sync_global_error.cc
|
| +++ b/chrome/browser/sync/sync_global_error.cc
|
| @@ -4,8 +4,11 @@
|
|
|
| #include "chrome/browser/sync/sync_global_error.h"
|
|
|
| +#include "base/utf_string_conversions.h"
|
| #include "chrome/app/chrome_command_ids.h"
|
| #include "chrome/browser/api/sync/profile_sync_service_observer.h"
|
| +#include "chrome/browser/signin/about_signin_internals.h"
|
| +#include "chrome/browser/signin/about_signin_internals_factory.h"
|
| #include "chrome/browser/sync/profile_sync_service.h"
|
| #include "chrome/browser/sync/sync_ui_util.h"
|
| #include "chrome/browser/ui/browser.h"
|
| @@ -16,6 +19,7 @@
|
| #include "chrome/browser/ui/webui/signin/login_ui_service.h"
|
| #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
|
| #include "chrome/common/url_constants.h"
|
| +#include "google_apis/gaia/gaia_constants.h"
|
| #include "google_apis/gaia/google_service_auth_error.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| @@ -132,6 +136,11 @@ void SyncGlobalError::OnStateChanged() {
|
| if (profile) {
|
| GlobalErrorServiceFactory::GetForProfile(
|
| profile)->NotifyErrorsChanged(this);
|
| +
|
| + // Also push these errors to the about:signin-internals page.
|
| + string16 consolidated_error_msg = menu_label_;
|
| + consolidated_error_msg.append(bubble_message_.c_str());
|
| + NotifyTokenFailureOccurred(consolidated_error_msg);
|
| }
|
| }
|
| }
|
| @@ -139,3 +148,12 @@ void SyncGlobalError::OnStateChanged() {
|
| bool SyncGlobalError::HasCustomizedSyncMenuItem() {
|
| return !menu_label_.empty();
|
| }
|
| +
|
| +// TODO(vishwath): Ensure that it's not incorrect to be overwriting
|
| +// regular token fetch status for the syncservice token.
|
| +void SyncGlobalError::NotifyTokenFailureOccurred(const string16& error_msg) {
|
| + DCHECK(service_->profile());
|
| + AboutSigninInternalsFactory::GetForProfile(service_->profile())->
|
| + NotifyTokenReceivedFailure(GaiaConstants::kSyncService,
|
| + UTF16ToUTF8(error_msg));
|
| +}
|
|
|