| 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..030566e294320942968b0533586e5504f6bc6afc 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";
|
| + LogUMAHistogramEnumeration(
|
| + "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
|
|
|