| 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 #include "components/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/autofill_metrics.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 "Autofill.NumberOfEditedAutofilledFieldsAtSubmission", | 636 "Autofill.NumberOfEditedAutofilledFieldsAtSubmission", |
| 637 num_edited_autofilled_fields); | 637 num_edited_autofilled_fields); |
| 638 } | 638 } |
| 639 | 639 |
| 640 // static | 640 // static |
| 641 void AutofillMetrics::LogServerResponseHasDataForForm(bool has_data) { | 641 void AutofillMetrics::LogServerResponseHasDataForForm(bool has_data) { |
| 642 UMA_HISTOGRAM_BOOLEAN("Autofill.ServerResponseHasDataForForm", has_data); | 642 UMA_HISTOGRAM_BOOLEAN("Autofill.ServerResponseHasDataForForm", has_data); |
| 643 } | 643 } |
| 644 | 644 |
| 645 // static | 645 // static |
| 646 void AutofillMetrics::LogAutomaticProfileCreation(bool created) { | 646 void AutofillMetrics::LogProfileActionOnFormSubmitted( |
| 647 UMA_HISTOGRAM_BOOLEAN("Autofill.AutomaticProfileCreation", created); | 647 AutofillProfileAction action) { |
| 648 UMA_HISTOGRAM_ENUMERATION("Autofill.ProfileActionOnFormSubmitted", action, |
| 649 AUTOFILL_PROFILE_ACTION_ENUM_SIZE); |
| 648 } | 650 } |
| 649 | 651 |
| 650 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card) | 652 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card) |
| 651 : is_for_credit_card_(is_for_credit_card), | 653 : is_for_credit_card_(is_for_credit_card), |
| 652 is_server_data_available_(false), | 654 is_server_data_available_(false), |
| 653 is_local_data_available_(false), | 655 is_local_data_available_(false), |
| 654 has_logged_interacted_(false), | 656 has_logged_interacted_(false), |
| 655 has_logged_suggestions_shown_(false), | 657 has_logged_suggestions_shown_(false), |
| 656 has_logged_masked_server_card_suggestion_selected_(false), | 658 has_logged_masked_server_card_suggestion_selected_(false), |
| 657 has_logged_suggestion_filled_(false), | 659 has_logged_suggestion_filled_(false), |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 else if (is_server_data_available_ && !is_local_data_available_) | 795 else if (is_server_data_available_ && !is_local_data_available_) |
| 794 name += ".WithOnlyServerData"; | 796 name += ".WithOnlyServerData"; |
| 795 else if (!is_server_data_available_ && is_local_data_available_) | 797 else if (!is_server_data_available_ && is_local_data_available_) |
| 796 name += ".WithOnlyLocalData"; | 798 name += ".WithOnlyLocalData"; |
| 797 else | 799 else |
| 798 name += ".WithBothServerAndLocalData"; | 800 name += ".WithBothServerAndLocalData"; |
| 799 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 801 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); |
| 800 } | 802 } |
| 801 | 803 |
| 802 } // namespace autofill | 804 } // namespace autofill |
| OLD | NEW |