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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Experiment to add bank name in autofill ui. Created 3 years, 5 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 #include <utility> 10 #include <utility>
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 FORM_EVENT_LOCAL_SUGGESTION_WILL_SUBMIT_ONCE, 538 FORM_EVENT_LOCAL_SUGGESTION_WILL_SUBMIT_ONCE,
539 FORM_EVENT_SERVER_SUGGESTION_WILL_SUBMIT_ONCE, 539 FORM_EVENT_SERVER_SUGGESTION_WILL_SUBMIT_ONCE,
540 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_WILL_SUBMIT_ONCE, 540 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_WILL_SUBMIT_ONCE,
541 // A dropdown with suggestions was shown and a form was submitted after 541 // A dropdown with suggestions was shown and a form was submitted after
542 // that. 542 // that.
543 FORM_EVENT_SUGGESTION_SHOWN_SUBMITTED_ONCE, 543 FORM_EVENT_SUGGESTION_SHOWN_SUBMITTED_ONCE,
544 // A dropdown with suggestions was shown and a form is about to be 544 // A dropdown with suggestions was shown and a form is about to be
545 // submitted. If the submission is not interrupted by JavaScript, the "form 545 // submitted. If the submission is not interrupted by JavaScript, the "form
546 // submitted" event above will also be logged. 546 // submitted" event above will also be logged.
547 FORM_EVENT_SUGGESTION_SHOWN_WILL_SUBMIT_ONCE, 547 FORM_EVENT_SUGGESTION_SHOWN_WILL_SUBMIT_ONCE,
548 NUM_FORM_EVENTS,
549 };
548 550
549 NUM_FORM_EVENTS, 551 // Form Events for autofill with bank name available for display.
552 enum BankNameDisplayedFormEvent {
553 // A dropdown with suggestions was shown and at least one suggestion has a
554 // bank name. Logged at most once per page load.
555 FORM_EVENT_SUGGESTIONS_SHOWN_WITH_BANK_NAME_AVAILABLE_ONCE = 0,
556 // A server suggestion was used to fill the form and at least one suggestion
557 // has a bank name. Logged at most once per page load.
558 FORM_EVENT_SERVER_SUGGESTION_FILLED_WITH_BANK_NAME_AVAILABLE_ONCE,
559 BANK_NAME_NUM_FORM_EVENTS,
550 }; 560 };
551 561
552 // Events related to the Unmask Credit Card Prompt. 562 // Events related to the Unmask Credit Card Prompt.
553 enum UnmaskPromptEvent { 563 enum UnmaskPromptEvent {
554 // The prompt was shown. 564 // The prompt was shown.
555 UNMASK_PROMPT_SHOWN = 0, 565 UNMASK_PROMPT_SHOWN = 0,
556 // The prompt was closed without attempting to unmask the card. 566 // The prompt was closed without attempting to unmask the card.
557 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS, 567 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS,
558 // The prompt was closed without unmasking the card, but with at least 568 // The prompt was closed without unmasking the card, but with at least
559 // one attempt. The last failure was retriable. 569 // one attempt. The last failure was retriable.
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 // In case of masked cards, caller must make sure this gets called before 943 // In case of masked cards, caller must make sure this gets called before
934 // the card is upgraded to a full card. 944 // the card is upgraded to a full card.
935 void OnDidFillSuggestion(const CreditCard& credit_card); 945 void OnDidFillSuggestion(const CreditCard& credit_card);
936 946
937 void OnDidFillSuggestion(const AutofillProfile& profile); 947 void OnDidFillSuggestion(const AutofillProfile& profile);
938 948
939 void OnWillSubmitForm(); 949 void OnWillSubmitForm();
940 950
941 void OnFormSubmitted(); 951 void OnFormSubmitted();
942 952
953 void SetBankNameAvailable();
943 private: 954 private:
944 void Log(FormEvent event) const; 955 void Log(FormEvent event) const;
956 void Log(BankNameDisplayedFormEvent event) const;
945 957
946 bool is_for_credit_card_; 958 bool is_for_credit_card_;
947 size_t server_record_type_count_; 959 size_t server_record_type_count_;
948 size_t local_record_type_count_; 960 size_t local_record_type_count_;
949 bool is_context_secure_; 961 bool is_context_secure_;
950 bool has_logged_interacted_; 962 bool has_logged_interacted_;
951 bool has_logged_suggestions_shown_; 963 bool has_logged_suggestions_shown_;
952 bool has_logged_masked_server_card_suggestion_selected_; 964 bool has_logged_masked_server_card_suggestion_selected_;
953 bool has_logged_suggestion_filled_; 965 bool has_logged_suggestion_filled_;
954 bool has_logged_will_submit_; 966 bool has_logged_will_submit_;
955 bool has_logged_submitted_; 967 bool has_logged_submitted_;
968 bool has_logged_bank_name_available_;
956 bool logged_suggestion_filled_was_server_data_; 969 bool logged_suggestion_filled_was_server_data_;
957 bool logged_suggestion_filled_was_masked_server_card_; 970 bool logged_suggestion_filled_was_masked_server_card_;
958 971
959 // The last field that was polled for suggestions. 972 // The last field that was polled for suggestions.
960 FormFieldData last_polled_field_; 973 FormFieldData last_polled_field_;
961 974
962 FormInteractionsUkmLogger* 975 FormInteractionsUkmLogger*
963 form_interactions_ukm_logger_; // Weak reference. 976 form_interactions_ukm_logger_; // Weak reference.
964 }; 977 };
965 978
966 private: 979 private:
967 static const int kNumCardUploadDecisionMetrics = 12; 980 static const int kNumCardUploadDecisionMetrics = 12;
968 981
969 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); 982 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics);
970 }; 983 };
971 984
972 } // namespace autofill 985 } // namespace autofill
973 986
974 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 987 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/autofill_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698