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: components/autofill/core/browser/autofill_metrics.cc

Issue 2887133005: Assert that form submission state is not one of the autofill states when (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_metrics.cc
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc
index bb0cac81f67629473b4d857d929317467d220e6d..2f9c996895b6c5782f5a76999f239e3310e90876 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -1141,8 +1141,11 @@ void AutofillMetrics::FormInteractionsUkmLogger::LogFormSubmitted(
source_id_, internal::kUKMFormSubmittedEntryName);
builder->AddMetric(internal::kUKMAutofillFormSubmittedStateMetricName,
static_cast<int>(state));
- builder->AddMetric(internal::kUKMMillisecondsSinceFormParsedMetricName,
- MillisecondsSinceFormParsed());
+ if (form_parsed_timestamp_.is_null())
+ DCHECK_EQ(state, NON_FILLABLE_FORM_OR_NEW_DATA);
+ else
+ builder->AddMetric(internal::kUKMMillisecondsSinceFormParsedMetricName,
+ MillisecondsSinceFormParsed());
}
void AutofillMetrics::FormInteractionsUkmLogger::UpdateSourceURL(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698