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

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

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Headers cleanup Created 5 years, 11 months 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/chrome_signin_client.cc
diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
index bae9a04a6af04edbc34bd22ea18a235f89be6a8f..73207f1dc4ad3f132349b4f3196cb7531f2da0fd 100644
--- a/chrome/browser/signin/chrome_signin_client.cc
+++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -16,10 +16,12 @@
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/signin/local_auth.h"
+#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_cookie_changed_subscription.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_version_info.h"
#include "components/metrics/metrics_service.h"
+#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/signin/core/common/signin_pref_names.h"
#include "components/signin/core/common/signin_switches.h"
@@ -232,3 +234,14 @@ void ChromeSigninClient::PostSignedIn(const std::string& account_id,
chrome::SetLocalAuthCredentials(profile_, password);
#endif
}
+
+void ChromeSigninClient::OnErrorChanged() {
+ ProfileInfoCache& cache = g_browser_process->profile_manager()->
+ GetProfileInfoCache();
+ size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
+ if (index != std::string::npos) {
noms (inactive) 2015/01/08 21:49:04 nit: change to if (index==std::string::npos) r
Mike Lerman 2015/01/09 02:15:04 I don't really like it... but Done.
+ cache.SetProfileIsAuthErrorAtIndex(index,
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->
+ signin_error_controller()->HasError());
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698