| 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/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "chrome/browser/autofill/autofill_type.h" | 9 #include "chrome/browser/autofill/autofill_type.h" |
| 10 #include "chrome/browser/autofill/form_structure.h" | 10 #include "chrome/browser/autofill/form_structure.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 LogUMAHistogramEnumeration(histogram_name, metric, NUM_QUALITY_METRICS); | 281 LogUMAHistogramEnumeration(histogram_name, metric, NUM_QUALITY_METRICS); |
| 282 } | 282 } |
| 283 | 283 |
| 284 void AutofillMetrics::LogServerQueryMetric(ServerQueryMetric metric) const { | 284 void AutofillMetrics::LogServerQueryMetric(ServerQueryMetric metric) const { |
| 285 DCHECK(metric < NUM_SERVER_QUERY_METRICS); | 285 DCHECK(metric < NUM_SERVER_QUERY_METRICS); |
| 286 | 286 |
| 287 UMA_HISTOGRAM_ENUMERATION("Autofill.ServerQueryResponse", metric, | 287 UMA_HISTOGRAM_ENUMERATION("Autofill.ServerQueryResponse", metric, |
| 288 NUM_SERVER_QUERY_METRICS); | 288 NUM_SERVER_QUERY_METRICS); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void AutofillMetrics::LogUserHappinessMetric(UserHappinessMetric metric) const { |
| 292 DCHECK(metric < NUM_USER_HAPPINESS_METRICS); |
| 293 |
| 294 UMA_HISTOGRAM_ENUMERATION("Autofill.UserHappiness", metric, |
| 295 NUM_USER_HAPPINESS_METRICS); |
| 296 } |
| 297 |
| 291 void AutofillMetrics::LogIsAutofillEnabledAtStartup(bool enabled) const { | 298 void AutofillMetrics::LogIsAutofillEnabledAtStartup(bool enabled) const { |
| 292 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.Startup", enabled); | 299 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.Startup", enabled); |
| 293 } | 300 } |
| 294 | 301 |
| 295 void AutofillMetrics::LogIsAutofillEnabledAtPageLoad(bool enabled) const { | 302 void AutofillMetrics::LogIsAutofillEnabledAtPageLoad(bool enabled) const { |
| 296 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.PageLoad", enabled); | 303 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.PageLoad", enabled); |
| 297 } | 304 } |
| 298 | 305 |
| 299 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const { | 306 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const { |
| 300 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); | 307 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); |
| 301 } | 308 } |
| 302 | 309 |
| 303 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) const { | 310 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) const { |
| 304 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions); | 311 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions); |
| 305 } | 312 } |
| 306 | 313 |
| 307 void AutofillMetrics::LogServerExperimentIdForQuery( | 314 void AutofillMetrics::LogServerExperimentIdForQuery( |
| 308 const std::string& experiment_id) const { | 315 const std::string& experiment_id) const { |
| 309 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 316 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 310 } | 317 } |
| 311 | 318 |
| 312 void AutofillMetrics::LogServerExperimentIdForUpload( | 319 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 313 const std::string& experiment_id) const { | 320 const std::string& experiment_id) const { |
| 314 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 321 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 315 } | 322 } |
| OLD | NEW |