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 #include "components/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/autofill_metrics.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 "Autofill.NumberOfEditedAutofilledFieldsAtSubmission", | 625 "Autofill.NumberOfEditedAutofilledFieldsAtSubmission", |
| 626 num_edited_autofilled_fields); | 626 num_edited_autofilled_fields); |
| 627 } | 627 } |
| 628 | 628 |
| 629 // static | 629 // static |
| 630 void AutofillMetrics::LogServerResponseHasDataForForm(bool has_data) { | 630 void AutofillMetrics::LogServerResponseHasDataForForm(bool has_data) { |
| 631 UMA_HISTOGRAM_BOOLEAN("Autofill.ServerResponseHasDataForForm", has_data); | 631 UMA_HISTOGRAM_BOOLEAN("Autofill.ServerResponseHasDataForForm", has_data); |
| 632 } | 632 } |
| 633 | 633 |
| 634 // static | 634 // static |
| 635 void AutofillMetrics::LogAutomaticProfileCreation(bool created) { | 635 void AutofillMetrics::LogProfileActionOnFormSubmitted( |
| 636 UMA_HISTOGRAM_BOOLEAN("Autofill.AutomaticProfileCreation", created); | 636 AutofillProfileAction action) { |
| 637 UMA_HISTOGRAM_ENUMERATION("Autofill.ProfileActionOnFormSubmitted", action, | |
| 638 NEW_PROFILE_CREATED); | |
|
rkaplow
2015/10/07 15:04:56
this should be the max value enum entry
sebsg
2015/10/08 14:55:05
Done.
| |
| 637 } | 639 } |
| 638 | 640 |
| 639 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card) | 641 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card) |
| 640 : is_for_credit_card_(is_for_credit_card), | 642 : is_for_credit_card_(is_for_credit_card), |
| 641 is_server_data_available_(false), | 643 is_server_data_available_(false), |
| 642 is_local_data_available_(false), | 644 is_local_data_available_(false), |
| 643 has_logged_interacted_(false), | 645 has_logged_interacted_(false), |
| 644 has_logged_suggestions_shown_(false), | 646 has_logged_suggestions_shown_(false), |
| 645 has_logged_masked_server_card_suggestion_selected_(false), | 647 has_logged_masked_server_card_suggestion_selected_(false), |
| 646 has_logged_suggestion_filled_(false), | 648 has_logged_suggestion_filled_(false), |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 782 else if (is_server_data_available_ && !is_local_data_available_) | 784 else if (is_server_data_available_ && !is_local_data_available_) |
| 783 name += ".WithOnlyServerData"; | 785 name += ".WithOnlyServerData"; |
| 784 else if (!is_server_data_available_ && is_local_data_available_) | 786 else if (!is_server_data_available_ && is_local_data_available_) |
| 785 name += ".WithOnlyLocalData"; | 787 name += ".WithOnlyLocalData"; |
| 786 else | 788 else |
| 787 name += ".WithBothServerAndLocalData"; | 789 name += ".WithBothServerAndLocalData"; |
| 788 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 790 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); |
| 789 } | 791 } |
| 790 | 792 |
| 791 } // namespace autofill | 793 } // namespace autofill |
| OLD | NEW |