| 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 "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 "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/browser/autofill/autofill_type.h" | 10 #include "chrome/browser/autofill/autofill_type.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 318 |
| 319 case DIALOG_CANCELED: | 319 case DIALOG_CANCELED: |
| 320 suffix = "Cancel"; | 320 suffix = "Cancel"; |
| 321 break; | 321 break; |
| 322 } | 322 } |
| 323 | 323 |
| 324 LogUMAHistogramLongTimes(prefix + ".UiDuration", duration); | 324 LogUMAHistogramLongTimes(prefix + ".UiDuration", duration); |
| 325 LogUMAHistogramLongTimes(prefix + ".UiDuration." + suffix, duration); | 325 LogUMAHistogramLongTimes(prefix + ".UiDuration." + suffix, duration); |
| 326 } | 326 } |
| 327 | 327 |
| 328 void AutofillMetrics::LogDialogInitialUserState( |
| 329 autofill::DialogType dialog_type, |
| 330 DialogInitialUserStateMetric user_type) const { |
| 331 std::string name = GetPrefixForDialogType(dialog_type) + ".InitialUserState"; |
| 332 LogUMAHistogramEnumeration( |
| 333 name, user_type, NUM_DIALOG_INITIAL_USER_STATE_METRICS); |
| 334 } |
| 335 |
| 328 void AutofillMetrics::LogWalletErrorMetric(autofill::DialogType dialog_type, | 336 void AutofillMetrics::LogWalletErrorMetric(autofill::DialogType dialog_type, |
| 329 WalletErrorMetric metric) const { | 337 WalletErrorMetric metric) const { |
| 330 std::string name = GetPrefixForDialogType(dialog_type) + ".WalletErrors"; | 338 std::string name = GetPrefixForDialogType(dialog_type) + ".WalletErrors"; |
| 331 LogUMAHistogramEnumeration(name, metric, NUM_WALLET_ERROR_METRICS); | 339 LogUMAHistogramEnumeration(name, metric, NUM_WALLET_ERROR_METRICS); |
| 332 } | 340 } |
| 333 | 341 |
| 334 void AutofillMetrics::LogWalletRequiredAction( | 342 void AutofillMetrics::LogWalletRequiredAction( |
| 335 autofill::DialogType dialog_type, | 343 autofill::DialogType dialog_type, |
| 336 WalletRequiredAction required_action) const { | 344 WalletRequiredAction required_action) const { |
| 337 std::string name = | 345 std::string name = |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 482 |
| 475 void AutofillMetrics::LogServerExperimentIdForQuery( | 483 void AutofillMetrics::LogServerExperimentIdForQuery( |
| 476 const std::string& experiment_id) const { | 484 const std::string& experiment_id) const { |
| 477 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 485 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 478 } | 486 } |
| 479 | 487 |
| 480 void AutofillMetrics::LogServerExperimentIdForUpload( | 488 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 481 const std::string& experiment_id) const { | 489 const std::string& experiment_id) const { |
| 482 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 490 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 483 } | 491 } |
| OLD | NEW |