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

Unified Diff: chrome/browser/signin/signin_global_error.cc

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android and Windows compiler errors Created 6 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
Index: chrome/browser/signin/signin_global_error.cc
diff --git a/chrome/browser/signin/signin_global_error.cc b/chrome/browser/signin/signin_global_error.cc
index 5f1174fc6e0b9c792d276babd3ce0ce99160e995..8eec2bf06c166a6e8279bc5d83112a5d93e543b9 100644
--- a/chrome/browser/signin/signin_global_error.cc
+++ b/chrome/browser/signin/signin_global_error.cc
@@ -6,7 +6,10 @@
#include "base/logging.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_info_cache.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -188,4 +191,12 @@ void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) {
void SigninGlobalError::OnErrorChanged() {
GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this);
+
+ ProfileInfoCache& cache = g_browser_process->profile_manager()->
+ GetProfileInfoCache();
+ size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
+ if (index != std::string::npos) {
+ cache.SetProfileAuthErrorAtIndex(index,
+ error_controller_->auth_error().state());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698