Commit 97f44551 authored by ginkage's avatar ginkage Committed by Commit bot

New metric to track usage of the new GAIA flow.

BUG=464051

Review URL: https://codereview.chromium.org/1009453003

Cr-Commit-Position: refs/heads/master@{#320880}
parent bc93da2f
......@@ -121,6 +121,11 @@ void RecordSAMLScrapingVerificationResultInHistogram(bool success) {
UMA_HISTOGRAM_BOOLEAN("ChromeOS.SAML.Scraping.VerificationResult", success);
}
void RecordGAIAFlowTypeHistogram() {
UMA_HISTOGRAM_BOOLEAN("ChromeOS.GAIA.WebViewFlow",
StartupUtils::IsWebviewSigninEnabled());
}
// The Task posted to PostTaskAndReply in StartClearingDnsCache on the IO
// thread.
void ClearDnsCache(IOThread* io_thread) {
......@@ -422,6 +427,8 @@ void GaiaScreenHandler::HandleCompleteAuthentication(
if (!Delegate())
return;
RecordGAIAFlowTypeHistogram();
DCHECK(!email.empty());
DCHECK(!gaia_id.empty());
const std::string sanitized_email = gaia::SanitizeEmail(email);
......@@ -438,6 +445,8 @@ void GaiaScreenHandler::HandleCompleteAuthenticationAuthCodeOnly(
if (!Delegate())
return;
RecordGAIAFlowTypeHistogram();
UserContext user_context;
user_context.SetAuthFlow(UserContext::AUTH_FLOW_EASY_BOOTSTRAP);
user_context.SetAuthCode(auth_code);
......@@ -579,6 +588,7 @@ void GaiaScreenHandler::DoCompleteLogin(const std::string& gaia_id,
if (using_saml && !using_saml_api_)
RecordSAMLScrapingVerificationResultInHistogram(true);
RecordGAIAFlowTypeHistogram();
DCHECK(!typed_email.empty());
DCHECK(!gaia_id.empty());
......
......@@ -2782,6 +2782,14 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>
<histogram name="ChromeOS.GAIA.WebViewFlow" enum="BooleanGAIAWebViewFlow">
<owner>ginkage@chromium.org</owner>
<summary>
Whether a user signed in using the new WebView-based GAIA flow. This value
is sent after the GAIA screen has completed user authentication.
</summary>
</histogram>
<histogram name="ChromeOS.MachineIdRegen.AgeSeconds" units="seconds">
<owner>zeuthen@chromium.org</owner>
<summary>
......@@ -45023,6 +45031,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="1" label="Force Disabled"/>
</enum>
<enum name="BooleanGAIAWebViewFlow" type="int">
<int value="0" label="iframe-based flow"/>
<int value="1" label="WebView-based flow"/>
</enum>
<enum name="BooleanHadBlankText" type="int">
<int value="0" label="Did not have blank text"/>
<int value="1" label="Had blank text"/>
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