| OLD | NEW |
| 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 FormEventLogger(bool is_for_credit_card); | 674 FormEventLogger(bool is_for_credit_card); |
| 675 | 675 |
| 676 inline void set_is_server_data_available(bool is_server_data_available) { | 676 inline void set_is_server_data_available(bool is_server_data_available) { |
| 677 is_server_data_available_ = is_server_data_available; | 677 is_server_data_available_ = is_server_data_available; |
| 678 } | 678 } |
| 679 | 679 |
| 680 inline void set_is_local_data_available(bool is_local_data_available) { | 680 inline void set_is_local_data_available(bool is_local_data_available) { |
| 681 is_local_data_available_ = is_local_data_available; | 681 is_local_data_available_ = is_local_data_available; |
| 682 } | 682 } |
| 683 | 683 |
| 684 inline void set_is_context_secure(bool is_context_secure) { |
| 685 is_context_secure_ = is_context_secure; |
| 686 } |
| 687 |
| 684 void OnDidInteractWithAutofillableForm(); | 688 void OnDidInteractWithAutofillableForm(); |
| 685 | 689 |
| 686 void OnDidPollSuggestions(const FormFieldData& field); | 690 void OnDidPollSuggestions(const FormFieldData& field); |
| 687 | 691 |
| 688 void OnDidShowSuggestions(); | 692 void OnDidShowSuggestions(); |
| 689 | 693 |
| 690 void OnDidSelectMaskedServerCardSuggestion(); | 694 void OnDidSelectMaskedServerCardSuggestion(); |
| 691 | 695 |
| 692 // In case of masked cards, caller must make sure this gets called before | 696 // In case of masked cards, caller must make sure this gets called before |
| 693 // the card is upgraded to a full card. | 697 // the card is upgraded to a full card. |
| 694 void OnDidFillSuggestion(const CreditCard& credit_card); | 698 void OnDidFillSuggestion(const CreditCard& credit_card); |
| 695 | 699 |
| 696 void OnDidFillSuggestion(const AutofillProfile& profile); | 700 void OnDidFillSuggestion(const AutofillProfile& profile); |
| 697 | 701 |
| 698 void OnWillSubmitForm(); | 702 void OnWillSubmitForm(); |
| 699 | 703 |
| 700 void OnFormSubmitted(); | 704 void OnFormSubmitted(); |
| 701 | 705 |
| 702 private: | 706 private: |
| 703 void Log(FormEvent event) const; | 707 void Log(FormEvent event) const; |
| 704 | 708 |
| 705 bool is_for_credit_card_; | 709 bool is_for_credit_card_; |
| 706 bool is_server_data_available_; | 710 bool is_server_data_available_; |
| 707 bool is_local_data_available_; | 711 bool is_local_data_available_; |
| 712 bool is_context_secure_; |
| 708 bool has_logged_interacted_; | 713 bool has_logged_interacted_; |
| 709 bool has_logged_suggestions_shown_; | 714 bool has_logged_suggestions_shown_; |
| 710 bool has_logged_masked_server_card_suggestion_selected_; | 715 bool has_logged_masked_server_card_suggestion_selected_; |
| 711 bool has_logged_suggestion_filled_; | 716 bool has_logged_suggestion_filled_; |
| 712 bool has_logged_will_submit_; | 717 bool has_logged_will_submit_; |
| 713 bool has_logged_submitted_; | 718 bool has_logged_submitted_; |
| 714 bool logged_suggestion_filled_was_server_data_; | 719 bool logged_suggestion_filled_was_server_data_; |
| 715 bool logged_suggestion_filled_was_masked_server_card_; | 720 bool logged_suggestion_filled_was_masked_server_card_; |
| 716 | 721 |
| 717 // The last field that was polled for suggestions. | 722 // The last field that was polled for suggestions. |
| 718 FormFieldData last_polled_field_; | 723 FormFieldData last_polled_field_; |
| 719 }; | 724 }; |
| 720 | 725 |
| 721 private: | 726 private: |
| 722 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 727 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
| 723 }; | 728 }; |
| 724 | 729 |
| 725 } // namespace autofill | 730 } // namespace autofill |
| 726 | 731 |
| 727 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 732 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| OLD | NEW |