| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/autofill_metrics.h" | 5 #include "components/autofill/browser/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 "base/time.h" | 9 #include "base/time.h" |
| 10 #include "components/autofill/browser/autofill_type.h" | 10 #include "components/autofill/browser/autofill_type.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 UMA_HISTOGRAM_ENUMERATION("Autocheckout.Bubble", metric, NUM_BUBBLE_METRICS); | 289 UMA_HISTOGRAM_ENUMERATION("Autocheckout.Bubble", metric, NUM_BUBBLE_METRICS); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) const { | 292 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) const { |
| 293 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); | 293 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); |
| 294 | 294 |
| 295 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric, | 295 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric, |
| 296 NUM_INFO_BAR_METRICS); | 296 NUM_INFO_BAR_METRICS); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void AutofillMetrics::LogDialogInitialUserState( |
| 300 autofill::DialogType dialog_type, |
| 301 DialogInitialUserStateMetric user_type) const { |
| 302 std::string name = GetPrefixForDialogType(dialog_type) + ".InitialUserState"; |
| 303 LogUMAHistogramEnumeration( |
| 304 name, user_type, NUM_DIALOG_INITIAL_USER_STATE_METRICS); |
| 305 } |
| 306 |
| 299 void AutofillMetrics::LogDialogSecurityMetric( | 307 void AutofillMetrics::LogDialogSecurityMetric( |
| 300 autofill::DialogType dialog_type, | 308 autofill::DialogType dialog_type, |
| 301 DialogSecurityMetric metric) const { | 309 DialogSecurityMetric metric) const { |
| 302 std::string name = GetPrefixForDialogType(dialog_type) + ".Security"; | 310 std::string name = GetPrefixForDialogType(dialog_type) + ".Security"; |
| 303 LogUMAHistogramEnumeration(name, metric, NUM_DIALOG_SECURITY_METRICS); | 311 LogUMAHistogramEnumeration(name, metric, NUM_DIALOG_SECURITY_METRICS); |
| 304 } | 312 } |
| 305 | 313 |
| 306 void AutofillMetrics::LogDialogUiDuration( | 314 void AutofillMetrics::LogDialogUiDuration( |
| 307 const base::TimeDelta& duration, | 315 const base::TimeDelta& duration, |
| 308 autofill::DialogType dialog_type, | 316 autofill::DialogType dialog_type, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 466 |
| 459 void AutofillMetrics::LogServerExperimentIdForQuery( | 467 void AutofillMetrics::LogServerExperimentIdForQuery( |
| 460 const std::string& experiment_id) const { | 468 const std::string& experiment_id) const { |
| 461 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 469 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 462 } | 470 } |
| 463 | 471 |
| 464 void AutofillMetrics::LogServerExperimentIdForUpload( | 472 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 465 const std::string& experiment_id) const { | 473 const std::string& experiment_id) const { |
| 466 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 474 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 467 } | 475 } |
| OLD | NEW |