Chromium Code Reviews| Index: components/autofill/core/browser/autofill_metrics.h |
| diff --git a/components/autofill/core/browser/autofill_metrics.h b/components/autofill/core/browser/autofill_metrics.h |
| index 78540dc4127fcf47760472d4b5302386781ac989..52d64755d69b79ce7f754e2c64f2083978b32b5b 100644 |
| --- a/components/autofill/core/browser/autofill_metrics.h |
| +++ b/components/autofill/core/browser/autofill_metrics.h |
| @@ -284,6 +284,34 @@ class AutofillMetrics { |
| NUM_FORM_EVENTS, |
| }; |
| + // Events related to the Unmask Credit Card Prompt. |
| + enum UnmaskPromptEvent { |
| + // The prompt was shown. |
| + UNMASK_PROMPT_SHOWN = 0, |
| + // The prompt was closed without attempting to unmask the card. |
| + UNMASK_PROMPT_CLOSED_NO_ATTEMPTS, |
| + // The prompt was closed without unmasking the card, but with at least |
| + // one attempt. |
| + UNMASK_PROMPT_CLOSED_FAILED_TO_UNMASK, |
| + // Successfully unmasked the card. |
| + UNMASK_PROMPT_UNMASKED_CARD, |
| + // Saved the card locally (masked card was upgraded to a full card). |
| + UNMASK_PROMPT_SAVED_CARD_LOCALLY, |
| + // User chose to opt in (checked the checkbox when it was empty). |
| + // Only logged if there was an attempt to unmask. |
| + UNMASK_PROMPT_LOCAL_SAVE_DID_OPT_IN, |
| + // User kept opt in (left the checkbox checked). |
| + // Only logged if there was an attempt to unmask. |
| + UNMASK_PROMPT_LOCAL_SAVE_KEPT_OPT_IN, |
|
Evan Stade
2015/03/17 01:49:15
this name doesn't quite make sense to me. You can'
Walter Cacau
2015/03/18 01:27:43
Done.
|
| + // User chose to opt out (unchecked the checkbox when it was check). |
| + // Only logged if there was an attempt to unmask. |
| + UNMASK_PROMPT_LOCAL_SAVE_DID_OPT_OUT, |
| + // User kept opt opt (left the checkbox unchecked). |
| + // Only logged if there was an attempt to unmask. |
| + UNMASK_PROMPT_LOCAL_SAVE_KEPT_OPT_OUT, |
| + NUM_UNMASK_PROMT_EVENTS, |
| + }; |
| + |
| // For measuring the network request time of various Wallet API calls. See |
| // WalletClient::RequestType. |
| enum WalletApiCallMetric { |
| @@ -410,6 +438,9 @@ class AutofillMetrics { |
| // Logs |event| to the UI events histogram. |
| static void LogDialogUiEvent(DialogUiEvent event); |
| + // Logs |event| to the unmask prompt events histogram. |
| + static void LogUnmaskPromptEvent(UnmaskPromptEvent event); |
| + |
| // Logs |metric| to the Wallet errors histogram. |
| static void LogWalletErrorMetric(WalletErrorMetric metric); |