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

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

Issue 2839683002: Logs different SaveCardPrompt histogram names depending on if user (Closed)
Patch Set: Android compile error. Created 3 years, 8 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 77442395f201073a68feac7dc21890f545343393..97da79a6e22aae90263eadab5b2922b00197b3d2 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -298,16 +298,18 @@ void AutofillMetrics::LogCardUploadDecisionMetric(
}
// static
-void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric,
- bool is_uploading) {
+void AutofillMetrics::LogCreditCardInfoBarMetric(
+ InfoBarMetric metric,
+ bool is_uploading,
+ bool did_user_accept_previous_save_credit_card_prompt) {
DCHECK_LT(metric, NUM_INFO_BAR_METRICS);
- if (is_uploading) {
- UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar.Server", metric,
- NUM_INFO_BAR_METRICS);
- } else {
- UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar.Local", metric,
- NUM_INFO_BAR_METRICS);
- }
+ std::string destination = is_uploading ? ".Server" : ".Local";
+ std::string previous_response =
+ did_user_accept_previous_save_credit_card_prompt ? ".PreviouslyAccepted"
+ : ".PreviouslyDenied";
+ UMA_HISTOGRAM_ENUMERATION(
+ "Autofill.CreditCardInfoBar" + destination + previous_response, metric,
+ NUM_INFO_BAR_METRICS);
}
// static
@@ -318,15 +320,20 @@ void AutofillMetrics::LogCreditCardFillingInfoBarMetric(InfoBarMetric metric) {
}
// static
-void AutofillMetrics::LogSaveCardPromptMetric(SaveCardPromptMetric metric,
- bool is_uploading,
- bool is_reshow) {
+void AutofillMetrics::LogSaveCardPromptMetric(
+ SaveCardPromptMetric metric,
+ bool is_uploading,
+ bool is_reshow,
+ bool did_user_accept_previous_save_credit_card_prompt) {
DCHECK_LT(metric, NUM_SAVE_CARD_PROMPT_METRICS);
std::string destination = is_uploading ? ".Upload" : ".Local";
std::string show = is_reshow ? ".Reshows" : ".FirstShow";
+ std::string previous_response =
+ did_user_accept_previous_save_credit_card_prompt ? ".PreviouslyAccepted"
+ : ".PreviouslyDenied";
LogUMAHistogramEnumeration(
- "Autofill.SaveCreditCardPrompt" + destination + show, metric,
- NUM_SAVE_CARD_PROMPT_METRICS);
+ "Autofill.SaveCreditCardPrompt" + destination + show + previous_response,
+ metric, NUM_SAVE_CARD_PROMPT_METRICS);
}
// static

Powered by Google App Engine
This is Rietveld 408576698