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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Address comments Created 3 years, 6 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 FORM_EVENT_LOCAL_SUGGESTION_WILL_SUBMIT_ONCE, 535 FORM_EVENT_LOCAL_SUGGESTION_WILL_SUBMIT_ONCE,
536 FORM_EVENT_SERVER_SUGGESTION_WILL_SUBMIT_ONCE, 536 FORM_EVENT_SERVER_SUGGESTION_WILL_SUBMIT_ONCE,
537 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_WILL_SUBMIT_ONCE, 537 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_WILL_SUBMIT_ONCE,
538 // A dropdown with suggestions was shown and a form was submitted after 538 // A dropdown with suggestions was shown and a form was submitted after
539 // that. 539 // that.
540 FORM_EVENT_SUGGESTION_SHOWN_SUBMITTED_ONCE, 540 FORM_EVENT_SUGGESTION_SHOWN_SUBMITTED_ONCE,
541 // A dropdown with suggestions was shown and a form is about to be 541 // A dropdown with suggestions was shown and a form is about to be
542 // submitted. If the submission is not interrupted by JavaScript, the "form 542 // submitted. If the submission is not interrupted by JavaScript, the "form
543 // submitted" event above will also be logged. 543 // submitted" event above will also be logged.
544 FORM_EVENT_SUGGESTION_SHOWN_WILL_SUBMIT_ONCE, 544 FORM_EVENT_SUGGESTION_SHOWN_WILL_SUBMIT_ONCE,
545 NUM_FORM_EVENTS,
546 };
545 547
546 NUM_FORM_EVENTS, 548 // Form Events for autofill bank name experiment.
549 enum BankNameExperimentFormEvent {
550 // A dropdown with suggestions was shown and suggestions have bank names.
jiahuiguo 2017/06/14 05:51:28 suggestions shown with bank names?
Shanfeng 2017/06/14 17:48:25 Acknowledged.
551 FORM_EVENT_SUGGESTIONS_SHOWN_WITH_BANK_NAME_AVAILABLE_ONCE = 0,
552 // A server suggestion was used to fill the form and suggestions have bank
Jared Saul 2017/06/14 16:49:15 Alternate: Consider changing "suggestions have ban
Shanfeng 2017/06/14 17:48:25 Done.
553 // names.
554 FORM_EVENT_SERVER_SUGGESTION_FILLED_WITH_BANK_NAME_AVAILABLE_ONCE,
555 BANK_NAME_NUM_FORM_EVENTS,
547 }; 556 };
548 557
549 // Events related to the Unmask Credit Card Prompt. 558 // Events related to the Unmask Credit Card Prompt.
550 enum UnmaskPromptEvent { 559 enum UnmaskPromptEvent {
551 // The prompt was shown. 560 // The prompt was shown.
552 UNMASK_PROMPT_SHOWN = 0, 561 UNMASK_PROMPT_SHOWN = 0,
553 // The prompt was closed without attempting to unmask the card. 562 // The prompt was closed without attempting to unmask the card.
554 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS, 563 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS,
555 // The prompt was closed without unmasking the card, but with at least 564 // The prompt was closed without unmasking the card, but with at least
556 // one attempt. The last failure was retriable. 565 // one attempt. The last failure was retriable.
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 // In case of masked cards, caller must make sure this gets called before 939 // In case of masked cards, caller must make sure this gets called before
931 // the card is upgraded to a full card. 940 // the card is upgraded to a full card.
932 void OnDidFillSuggestion(const CreditCard& credit_card); 941 void OnDidFillSuggestion(const CreditCard& credit_card);
933 942
934 void OnDidFillSuggestion(const AutofillProfile& profile); 943 void OnDidFillSuggestion(const AutofillProfile& profile);
935 944
936 void OnWillSubmitForm(); 945 void OnWillSubmitForm();
937 946
938 void OnFormSubmitted(); 947 void OnFormSubmitted();
939 948
949 void SetBankNameAvailable();
940 private: 950 private:
941 void Log(FormEvent event) const; 951 void Log(FormEvent event) const;
952 void Log(BankNameExperimentFormEvent event) const;
942 953
943 bool is_for_credit_card_; 954 bool is_for_credit_card_;
944 size_t server_record_type_count_; 955 size_t server_record_type_count_;
945 size_t local_record_type_count_; 956 size_t local_record_type_count_;
946 bool is_context_secure_; 957 bool is_context_secure_;
947 bool has_logged_interacted_; 958 bool has_logged_interacted_;
948 bool has_logged_suggestions_shown_; 959 bool has_logged_suggestions_shown_;
949 bool has_logged_masked_server_card_suggestion_selected_; 960 bool has_logged_masked_server_card_suggestion_selected_;
950 bool has_logged_suggestion_filled_; 961 bool has_logged_suggestion_filled_;
951 bool has_logged_will_submit_; 962 bool has_logged_will_submit_;
952 bool has_logged_submitted_; 963 bool has_logged_submitted_;
964 bool has_logged_bank_name_available_;
953 bool logged_suggestion_filled_was_server_data_; 965 bool logged_suggestion_filled_was_server_data_;
954 bool logged_suggestion_filled_was_masked_server_card_; 966 bool logged_suggestion_filled_was_masked_server_card_;
955 967
956 // The last field that was polled for suggestions. 968 // The last field that was polled for suggestions.
957 FormFieldData last_polled_field_; 969 FormFieldData last_polled_field_;
958 970
959 FormInteractionsUkmLogger* 971 FormInteractionsUkmLogger*
960 form_interactions_ukm_logger_; // Weak reference. 972 form_interactions_ukm_logger_; // Weak reference.
961 }; 973 };
962 974
963 private: 975 private:
964 static const int kNumCardUploadDecisionMetrics = 12; 976 static const int kNumCardUploadDecisionMetrics = 12;
965 977
966 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); 978 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics);
967 }; 979 };
968 980
969 } // namespace autofill 981 } // namespace autofill
970 982
971 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 983 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698