Chromium Code Reviews| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 511 ACCEPT_TOS, | 511 ACCEPT_TOS, |
| 512 UPDATE_EXPIRATION_DATE, | 512 UPDATE_EXPIRATION_DATE, |
| 513 UPGRADE_MIN_ADDRESS, | 513 UPGRADE_MIN_ADDRESS, |
| 514 CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS, | 514 CHOOSE_ANOTHER_INSTRUMENT_OR_ADDRESS, |
| 515 VERIFY_CVV, | 515 VERIFY_CVV, |
| 516 INVALID_FORM_FIELD, | 516 INVALID_FORM_FIELD, |
| 517 REQUIRE_PHONE_NUMBER, | 517 REQUIRE_PHONE_NUMBER, |
| 518 NUM_WALLET_REQUIRED_ACTIONS | 518 NUM_WALLET_REQUIRED_ACTIONS |
| 519 }; | 519 }; |
| 520 | 520 |
| 521 // For mesuring how wallet addresses are converted to local profiles. | |
| 522 enum WalletAddressConversionType { | |
|
Mathieu
2017/02/02 01:22:52
enum WalletAddressConversionType : int {
sebsg
2017/02/02 15:18:51
Done.
| |
| 523 // The converted wallet address was merged into an existing local profile. | |
| 524 CONVERTED_ADDRESS_MERGED, | |
| 525 // The converted wallet address was added as a new local profile. | |
| 526 CONVERTED_ADDRESS_ADDED, | |
| 527 NUM_CONVERTED_ADDRESS_CONVERSION_TYPES | |
| 528 }; | |
| 529 | |
| 521 static void LogCardUploadDecisionMetric(CardUploadDecisionMetric metric); | 530 static void LogCardUploadDecisionMetric(CardUploadDecisionMetric metric); |
| 522 static void LogCreditCardInfoBarMetric(InfoBarMetric metric, | 531 static void LogCreditCardInfoBarMetric(InfoBarMetric metric, |
| 523 bool is_uploading); | 532 bool is_uploading); |
| 524 static void LogCreditCardFillingInfoBarMetric(InfoBarMetric metric); | 533 static void LogCreditCardFillingInfoBarMetric(InfoBarMetric metric); |
| 525 static void LogSaveCardPromptMetric(SaveCardPromptMetric metric, | 534 static void LogSaveCardPromptMetric(SaveCardPromptMetric metric, |
| 526 bool is_uploading, | 535 bool is_uploading, |
| 527 bool is_reshow); | 536 bool is_reshow); |
| 528 static void LogScanCreditCardPromptMetric(ScanCreditCardPromptMetric metric); | 537 static void LogScanCreditCardPromptMetric(ScanCreditCardPromptMetric metric); |
| 529 | 538 |
| 530 // Should be called when credit card scan is finished. |duration| should be | 539 // Should be called when credit card scan is finished. |duration| should be |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 656 // Log how many profiles were considered for the deduplication process. | 665 // Log how many profiles were considered for the deduplication process. |
| 657 static void LogNumberOfProfilesConsideredForDedupe(size_t num_considered); | 666 static void LogNumberOfProfilesConsideredForDedupe(size_t num_considered); |
| 658 | 667 |
| 659 // Log how many profiles were removed as part of the deduplication process. | 668 // Log how many profiles were removed as part of the deduplication process. |
| 660 static void LogNumberOfProfilesRemovedDuringDedupe(size_t num_removed); | 669 static void LogNumberOfProfilesRemovedDuringDedupe(size_t num_removed); |
| 661 | 670 |
| 662 // Log whether the Autofill query on a credit card form is made in a secure | 671 // Log whether the Autofill query on a credit card form is made in a secure |
| 663 // context. | 672 // context. |
| 664 static void LogIsQueriedCreditCardFormSecure(bool is_secure); | 673 static void LogIsQueriedCreditCardFormSecure(bool is_secure); |
| 665 | 674 |
| 675 // Log how the converted wallet address was added to the local autofill | |
| 676 // profiles. | |
| 677 static void LogWalletAddressConversionType(WalletAddressConversionType type); | |
| 678 | |
| 666 // Utility to autofill form events in the relevant histograms depending on | 679 // Utility to autofill form events in the relevant histograms depending on |
| 667 // the presence of server and/or local data. | 680 // the presence of server and/or local data. |
| 668 class FormEventLogger { | 681 class FormEventLogger { |
| 669 public: | 682 public: |
| 670 FormEventLogger(bool is_for_credit_card); | 683 FormEventLogger(bool is_for_credit_card); |
| 671 | 684 |
| 672 inline void set_is_server_data_available(bool is_server_data_available) { | 685 inline void set_is_server_data_available(bool is_server_data_available) { |
| 673 is_server_data_available_ = is_server_data_available; | 686 is_server_data_available_ = is_server_data_available; |
| 674 } | 687 } |
| 675 | 688 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 714 FormFieldData last_polled_field_; | 727 FormFieldData last_polled_field_; |
| 715 }; | 728 }; |
| 716 | 729 |
| 717 private: | 730 private: |
| 718 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 731 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
| 719 }; | 732 }; |
| 720 | 733 |
| 721 } // namespace autofill | 734 } // namespace autofill |
| 722 | 735 |
| 723 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 736 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| OLD | NEW |