Commit 1dea97e4 authored by yilkal's avatar yilkal Committed by Commit Bot

Record UMA metrics for the new EduCoexistence flow

This CL records the error state of access token
fetch in the new EduCoexistence flow. The histogram
already exists and doesn't need to be defined.

Bug: 1140250
Change-Id: I2da00d0d01f273127aeb081737e00397fd19b735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490732Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Commit-Queue: Yilkal Abe <yilkal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822255}
parent 45fe8f47
......@@ -53,6 +53,9 @@ constexpr char kEduCoexistenceLoginDefaultURL[] =
constexpr char kOobe[] = "oobe";
constexpr char kInSession[] = "in_session";
constexpr char kFetchAccessTokenResultHistogram[] =
"AccountManager.EduCoexistence.FetchAccessTokenResult";
signin::IdentityManager* GetIdentityManager() {
Profile* profile = ProfileManager::GetActiveUserProfile();
DCHECK(profile);
......@@ -197,6 +200,9 @@ void EduCoexistenceLoginHandler::OnRefreshTokenUpdatedForAccount(
void EduCoexistenceLoginHandler::OnOAuthAccessTokensFetched(
GoogleServiceAuthError error,
signin::AccessTokenInfo info) {
base::UmaHistogramEnumeration(kFetchAccessTokenResultHistogram, error.state(),
GoogleServiceAuthError::NUM_STATES);
if (error.state() != GoogleServiceAuthError::State::NONE) {
// TODO(yilkal) call on to the ui to show error screen.
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment