| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/autofill/autofill_metrics.h" | 5 #include "chrome/browser/autofill/autofill_metrics.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 7 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 8 | 9 |
| 9 AutofillMetrics::AutofillMetrics() { | 10 AutofillMetrics::AutofillMetrics() { |
| 10 } | 11 } |
| 11 | 12 |
| 12 AutofillMetrics::~AutofillMetrics() { | 13 AutofillMetrics::~AutofillMetrics() { |
| 13 } | 14 } |
| 14 | 15 |
| 15 void AutofillMetrics::Log(CreditCardInfoBarMetric metric) const { | 16 void AutofillMetrics::Log(CreditCardInfoBarMetric metric) const { |
| 16 DCHECK(metric < NUM_CREDIT_CARD_INFO_BAR_METRICS); | 17 DCHECK(metric < NUM_CREDIT_CARD_INFO_BAR_METRICS); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 33 std::string histogram_name = "Autofill.Quality"; | 34 std::string histogram_name = "Autofill.Quality"; |
| 34 if (!experiment_id.empty()) | 35 if (!experiment_id.empty()) |
| 35 histogram_name += "_" + experiment_id; | 36 histogram_name += "_" + experiment_id; |
| 36 | 37 |
| 37 UMA_HISTOGRAM_ENUMERATION(histogram_name, metric, NUM_QUALITY_METRICS); | 38 UMA_HISTOGRAM_ENUMERATION(histogram_name, metric, NUM_QUALITY_METRICS); |
| 38 } | 39 } |
| 39 | 40 |
| 40 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const { | 41 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const { |
| 41 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); | 42 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); |
| 42 } | 43 } |
| OLD | NEW |