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