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..a42bdf816aa3b5500d9d3a899410cfbe46e4b663 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, |
|
Evan Stade
2015/03/18 01:47:59
I think it would be nice to have:
- closed withou
Walter Cacau
2015/03/18 17:04:54
nice suggestion :) Done
|
| + // 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 did not opt in when he had the chance (left the checkbox unchecked). |
| + // Only logged if there was an attempt to unmask. |
| + UNMASK_PROMPT_LOCAL_SAVE_DID_NOT_OPT_IN, |
| + // 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 did not opt out when he had a chance (left the checkbox checked). |
| + // Only logged if there was an attempt to unmask. |
| + UNMASK_PROMPT_LOCAL_SAVE_DID_NOT_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); |