Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3583)

Unified Diff: chrome/browser/sync/sync_global_error.cc

Issue 11618024: [signin] Support for CrOS and OAuth2AccessTokenConsumer services. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Minor fixes Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/sync_global_error.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+}
« no previous file with comments | « chrome/browser/sync/sync_global_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698