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_download_manager.h" | |
14 #include "components/autofill/core/browser/autofill_profile.h" | 13 #include "components/autofill/core/browser/autofill_profile.h" |
15 #include "components/autofill/core/browser/credit_card.h" | 14 #include "components/autofill/core/browser/credit_card.h" |
16 #include "components/autofill/core/browser/field_types.h" | 15 #include "components/autofill/core/browser/field_types.h" |
17 | 16 |
18 namespace base { | 17 namespace base { |
19 class TimeDelta; | 18 class TimeDelta; |
20 } | 19 } |
21 | 20 |
22 namespace autofill { | 21 namespace autofill { |
23 | 22 |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 static void LogServerResponseHasDataForForm(bool has_data); | 643 static void LogServerResponseHasDataForForm(bool has_data); |
645 | 644 |
646 // This should be called at each form submission to indicate what profile | 645 // This should be called at each form submission to indicate what profile |
647 // action happened. | 646 // action happened. |
648 static void LogProfileActionOnFormSubmitted(AutofillProfileAction action); | 647 static void LogProfileActionOnFormSubmitted(AutofillProfileAction action); |
649 | 648 |
650 // This should be called at each form submission to indicate the autofilled | 649 // This should be called at each form submission to indicate the autofilled |
651 // state of the form. | 650 // state of the form. |
652 static void LogAutofillFormSubmittedState(AutofillFormSubmittedState state); | 651 static void LogAutofillFormSubmittedState(AutofillFormSubmittedState state); |
653 | 652 |
654 // Log the compression ratio obtained by compressing with gzip. Logs for the | |
655 // query or upload request, depending on |type|. | |
656 static void LogPayloadCompressionRatio( | |
657 int compression_ratio, | |
658 AutofillDownloadManager::RequestType type); | |
659 | |
660 // Utility to autofill form events in the relevant histograms depending on | 653 // Utility to autofill form events in the relevant histograms depending on |
661 // the presence of server and/or local data. | 654 // the presence of server and/or local data. |
662 class FormEventLogger { | 655 class FormEventLogger { |
663 public: | 656 public: |
664 FormEventLogger(bool is_for_credit_card); | 657 FormEventLogger(bool is_for_credit_card); |
665 | 658 |
666 inline void set_is_server_data_available(bool is_server_data_available) { | 659 inline void set_is_server_data_available(bool is_server_data_available) { |
667 is_server_data_available_ = is_server_data_available; | 660 is_server_data_available_ = is_server_data_available; |
668 } | 661 } |
669 | 662 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 bool logged_suggestion_filled_was_masked_server_card_; | 696 bool logged_suggestion_filled_was_masked_server_card_; |
704 }; | 697 }; |
705 | 698 |
706 private: | 699 private: |
707 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 700 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
708 }; | 701 }; |
709 | 702 |
710 } // namespace autofill | 703 } // namespace autofill |
711 | 704 |
712 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 705 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
OLD | NEW |