| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "components/autofill/core/browser/autofill_client.h" | 12 #include "components/autofill/core/browser/autofill_client.h" |
| 13 #include "components/autofill/core/browser/autofill_profile.h" | 13 #include "components/autofill/core/browser/autofill_profile.h" |
| 14 #include "components/autofill/core/browser/credit_card.h" | 14 #include "components/autofill/core/browser/credit_card.h" |
| 15 #include "components/autofill/core/browser/field_types.h" | 15 #include "components/autofill/core/browser/field_types.h" |
| 16 #include "components/autofill/core/common/form_field_data.h" |
| 16 | 17 |
| 17 namespace base { | 18 namespace base { |
| 18 class TimeDelta; | 19 class TimeDelta; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace autofill { | 22 namespace autofill { |
| 22 | 23 |
| 23 class AutofillMetrics { | 24 class AutofillMetrics { |
| 24 public: | 25 public: |
| 25 enum AutofillProfileAction { | 26 enum AutofillProfileAction { |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 inline void set_is_server_data_available(bool is_server_data_available) { | 655 inline void set_is_server_data_available(bool is_server_data_available) { |
| 655 is_server_data_available_ = is_server_data_available; | 656 is_server_data_available_ = is_server_data_available; |
| 656 } | 657 } |
| 657 | 658 |
| 658 inline void set_is_local_data_available(bool is_local_data_available) { | 659 inline void set_is_local_data_available(bool is_local_data_available) { |
| 659 is_local_data_available_ = is_local_data_available; | 660 is_local_data_available_ = is_local_data_available; |
| 660 } | 661 } |
| 661 | 662 |
| 662 void OnDidInteractWithAutofillableForm(); | 663 void OnDidInteractWithAutofillableForm(); |
| 663 | 664 |
| 664 void OnDidPollSuggestions(); | 665 void OnDidPollSuggestions(const FormFieldData& field); |
| 665 | 666 |
| 666 void OnDidShowSuggestions(); | 667 void OnDidShowSuggestions(); |
| 667 | 668 |
| 668 void OnDidSelectMaskedServerCardSuggestion(); | 669 void OnDidSelectMaskedServerCardSuggestion(); |
| 669 | 670 |
| 670 // In case of masked cards, caller must make sure this gets called before | 671 // In case of masked cards, caller must make sure this gets called before |
| 671 // the card is upgraded to a full card. | 672 // the card is upgraded to a full card. |
| 672 void OnDidFillSuggestion(const CreditCard& credit_card); | 673 void OnDidFillSuggestion(const CreditCard& credit_card); |
| 673 | 674 |
| 674 void OnDidFillSuggestion(const AutofillProfile& profile); | 675 void OnDidFillSuggestion(const AutofillProfile& profile); |
| 675 | 676 |
| 676 void OnWillSubmitForm(); | 677 void OnWillSubmitForm(); |
| 677 | 678 |
| 678 void OnFormSubmitted(); | 679 void OnFormSubmitted(); |
| 679 | 680 |
| 680 private: | 681 private: |
| 681 void Log(FormEvent event) const; | 682 void Log(FormEvent event) const; |
| 682 | 683 |
| 683 bool is_for_credit_card_; | 684 bool is_for_credit_card_; |
| 684 bool is_server_data_available_; | 685 bool is_server_data_available_; |
| 685 bool is_local_data_available_; | 686 bool is_local_data_available_; |
| 686 bool has_logged_interacted_; | 687 bool has_logged_interacted_; |
| 687 bool has_logged_suggestions_shown_; | 688 bool has_logged_suggestions_shown_; |
| 688 bool has_logged_masked_server_card_suggestion_selected_; | 689 bool has_logged_masked_server_card_suggestion_selected_; |
| 689 bool has_logged_suggestion_filled_; | 690 bool has_logged_suggestion_filled_; |
| 690 bool has_logged_will_submit_; | 691 bool has_logged_will_submit_; |
| 691 bool has_logged_submitted_; | 692 bool has_logged_submitted_; |
| 692 bool logged_suggestion_filled_was_server_data_; | 693 bool logged_suggestion_filled_was_server_data_; |
| 693 bool logged_suggestion_filled_was_masked_server_card_; | 694 bool logged_suggestion_filled_was_masked_server_card_; |
| 695 |
| 696 // The last field that was polled for suggestions. |
| 697 FormFieldData last_polled_field_; |
| 694 }; | 698 }; |
| 695 | 699 |
| 696 private: | 700 private: |
| 697 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 701 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
| 698 }; | 702 }; |
| 699 | 703 |
| 700 } // namespace autofill | 704 } // namespace autofill |
| 701 | 705 |
| 702 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 706 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| OLD | NEW |