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

Side by Side Diff: components/autofill/core/browser/autofill_metrics.h

Issue 949323002: Collecting UMA metrics for the UnmaskPrompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving collection to CardUnmaskPromptControllerImpl. Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 FORM_EVENT_LOCAL_SUGGESTION_SUBMITTED_ONCE, 277 FORM_EVENT_LOCAL_SUGGESTION_SUBMITTED_ONCE,
278 FORM_EVENT_SERVER_SUGGESTION_SUBMITTED_ONCE, 278 FORM_EVENT_SERVER_SUGGESTION_SUBMITTED_ONCE,
279 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SUBMITTED_ONCE, 279 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SUBMITTED_ONCE,
280 // A masked server card suggestion was selected to fill the form. 280 // A masked server card suggestion was selected to fill the form.
281 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED, 281 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED,
282 // Same as above but only triggered once per page load. 282 // Same as above but only triggered once per page load.
283 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED_ONCE, 283 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED_ONCE,
284 NUM_FORM_EVENTS, 284 NUM_FORM_EVENTS,
285 }; 285 };
286 286
287 // Events related to the Unmask Credit Card Prompt.
288 enum UnmaskPromptEvent {
289 // The prompt was shown.
290 UNMASK_PROMPT_SHOWN = 0,
291 // The prompt was closed without attempting to unmask the card.
292 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS,
293 // The prompt was closed without unmasking the card, but with at least
294 // one attempt.
295 UNMASK_PROMPT_CLOSED_FAILED_TO_UNMASK,
296 // Successfully unmasked the card.
297 UNMASK_PROMPT_UNMASKED_CARD,
298 // Saved the card locally (masked card was upgraded to a full card).
299 UNMASK_PROMPT_SAVED_CARD_LOCALLY,
300 // User chose to opt in (checked the checkbox when it was empty).
301 // Only logged if there was an attempt to unmask.
302 UNMASK_PROMPT_LOCAL_SAVE_DID_OPT_IN,
303 // User kept opt in (left the checkbox checked).
304 // Only logged if there was an attempt to unmask.
305 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.
306 // User chose to opt out (unchecked the checkbox when it was check).
307 // Only logged if there was an attempt to unmask.
308 UNMASK_PROMPT_LOCAL_SAVE_DID_OPT_OUT,
309 // User kept opt opt (left the checkbox unchecked).
310 // Only logged if there was an attempt to unmask.
311 UNMASK_PROMPT_LOCAL_SAVE_KEPT_OPT_OUT,
312 NUM_UNMASK_PROMT_EVENTS,
313 };
314
287 // For measuring the network request time of various Wallet API calls. See 315 // For measuring the network request time of various Wallet API calls. See
288 // WalletClient::RequestType. 316 // WalletClient::RequestType.
289 enum WalletApiCallMetric { 317 enum WalletApiCallMetric {
290 UNKNOWN_API_CALL, // Catch all. Should never be used. 318 UNKNOWN_API_CALL, // Catch all. Should never be used.
291 ACCEPT_LEGAL_DOCUMENTS, 319 ACCEPT_LEGAL_DOCUMENTS,
292 AUTHENTICATE_INSTRUMENT, 320 AUTHENTICATE_INSTRUMENT,
293 GET_FULL_WALLET, 321 GET_FULL_WALLET,
294 GET_WALLET_ITEMS, 322 GET_WALLET_ITEMS,
295 SAVE_TO_WALLET, 323 SAVE_TO_WALLET,
296 NUM_WALLET_API_CALLS 324 NUM_WALLET_API_CALLS
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // This should be called when the Autofill dialog is closed. |duration| 431 // This should be called when the Autofill dialog is closed. |duration|
404 // should be the time elapsed between the dialog being shown and it being 432 // should be the time elapsed between the dialog being shown and it being
405 // closed. |dismissal_action| should indicate whether the user dismissed 433 // closed. |dismissal_action| should indicate whether the user dismissed
406 // the dialog by submitting the form data or by canceling. 434 // the dialog by submitting the form data or by canceling.
407 static void LogDialogUiDuration(const base::TimeDelta& duration, 435 static void LogDialogUiDuration(const base::TimeDelta& duration,
408 DialogDismissalAction dismissal_action); 436 DialogDismissalAction dismissal_action);
409 437
410 // Logs |event| to the UI events histogram. 438 // Logs |event| to the UI events histogram.
411 static void LogDialogUiEvent(DialogUiEvent event); 439 static void LogDialogUiEvent(DialogUiEvent event);
412 440
441 // Logs |event| to the unmask prompt events histogram.
442 static void LogUnmaskPromptEvent(UnmaskPromptEvent event);
443
413 // Logs |metric| to the Wallet errors histogram. 444 // Logs |metric| to the Wallet errors histogram.
414 static void LogWalletErrorMetric(WalletErrorMetric metric); 445 static void LogWalletErrorMetric(WalletErrorMetric metric);
415 446
416 // Logs the network request time of Wallet API calls. 447 // Logs the network request time of Wallet API calls.
417 static void LogWalletApiCallDuration(WalletApiCallMetric metric, 448 static void LogWalletApiCallDuration(WalletApiCallMetric metric,
418 const base::TimeDelta& duration); 449 const base::TimeDelta& duration);
419 450
420 // Logs that the Wallet API call corresponding to |metric| was malformed. 451 // Logs that the Wallet API call corresponding to |metric| was malformed.
421 static void LogWalletMalformedResponseMetric(WalletApiCallMetric metric); 452 static void LogWalletMalformedResponseMetric(WalletApiCallMetric metric);
422 453
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 bool logged_suggestion_filled_was_masked_server_card_; 542 bool logged_suggestion_filled_was_masked_server_card_;
512 }; 543 };
513 544
514 private: 545 private:
515 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); 546 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics);
516 }; 547 };
517 548
518 } // namespace autofill 549 } // namespace autofill
519 550
520 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 551 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.cc ('k') | components/autofill/core/browser/autofill_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698