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

Unified Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 2672623005: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: fix test added in rebase Created 3 years, 10 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: 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 707e3f81828b5fe8b3fdc8ee3e07dcdae45307a5..3300b672d536b6c2c3499ee8fe1a85f357048294 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -693,6 +693,7 @@ AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card)
: is_for_credit_card_(is_for_credit_card),
is_server_data_available_(false),
is_local_data_available_(false),
+ is_context_secure_(false),
has_logged_interacted_(false),
has_logged_suggestions_shown_(false),
has_logged_masked_server_card_suggestion_selected_(false),
@@ -700,8 +701,7 @@ AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card)
has_logged_will_submit_(false),
has_logged_submitted_(false),
logged_suggestion_filled_was_server_data_(false),
- logged_suggestion_filled_was_masked_server_card_(false) {
-}
+ logged_suggestion_filled_was_masked_server_card_(false) {}
void AutofillMetrics::FormEventLogger::OnDidInteractWithAutofillableForm() {
if (!has_logged_interacted_) {
@@ -870,6 +870,14 @@ void AutofillMetrics::FormEventLogger::Log(FormEvent event) const {
name += "Address";
LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS);
+ // Log again in a different histogram for credit card forms on nonsecure
+ // pages, so that form interactions on nonsecure pages can be analyzed on
+ // their own.
+ if (is_for_credit_card_ && !is_context_secure_) {
+ LogUMAHistogramEnumeration(name + ".OnNonsecurePage", event,
+ NUM_FORM_EVENTS);
+ }
+
// Logging again in a different histogram for segmentation purposes.
// TODO(waltercacau): Re-evaluate if we still need such fine grained
// segmentation. http://crbug.com/454018
« no previous file with comments | « components/autofill/core/browser/autofill_metrics.h ('k') | components/autofill/core/browser/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698