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.h" | 8 #include "base/metrics/histogram.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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 duration); | 334 duration); | 
| 335 } | 335 } | 
| 336 | 336 | 
| 337 // static | 337 // static | 
| 338 void AutofillMetrics::LogDialogUiEvent(DialogUiEvent event) { | 338 void AutofillMetrics::LogDialogUiEvent(DialogUiEvent event) { | 
| 339 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.UiEvents", event, | 339 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.UiEvents", event, | 
| 340 NUM_DIALOG_UI_EVENTS); | 340 NUM_DIALOG_UI_EVENTS); | 
| 341 } | 341 } | 
| 342 | 342 | 
| 343 // static | 343 // static | 
| 344 void AutofillMetrics::LogUnmaskPromptEvent(UnmaskPromptEvent event) { | |
| 345 UMA_HISTOGRAM_ENUMERATION("Autofill.UnmaskPrompt.Events", event, | |
| 346 NUM_UNMASK_PROMT_EVENTS); | |
| 
 
Evan Stade
2015/03/18 01:47:59
PROMPT
 
Walter Cacau
2015/03/18 17:04:54
Done.
 
Walter Cacau
2015/03/18 17:04:54
Done.
 
 | |
| 347 } | |
| 348 | |
| 349 // static | |
| 344 void AutofillMetrics::LogWalletErrorMetric(WalletErrorMetric metric) { | 350 void AutofillMetrics::LogWalletErrorMetric(WalletErrorMetric metric) { | 
| 345 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.WalletErrors", metric, | 351 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.WalletErrors", metric, | 
| 346 NUM_WALLET_ERROR_METRICS); | 352 NUM_WALLET_ERROR_METRICS); | 
| 347 } | 353 } | 
| 348 | 354 | 
| 349 // static | 355 // static | 
| 350 void AutofillMetrics::LogWalletApiCallDuration( | 356 void AutofillMetrics::LogWalletApiCallDuration( | 
| 351 WalletApiCallMetric metric, | 357 WalletApiCallMetric metric, | 
| 352 const base::TimeDelta& duration) { | 358 const base::TimeDelta& duration) { | 
| 353 LogUMAHistogramTimes("Wallet.ApiCallDuration." + | 359 LogUMAHistogramTimes("Wallet.ApiCallDuration." + | 
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 604 else if (is_server_data_available_ && !is_local_data_available_) | 610 else if (is_server_data_available_ && !is_local_data_available_) | 
| 605 name += ".WithOnlyServerData"; | 611 name += ".WithOnlyServerData"; | 
| 606 else if (!is_server_data_available_ && is_local_data_available_) | 612 else if (!is_server_data_available_ && is_local_data_available_) | 
| 607 name += ".WithOnlyLocalData"; | 613 name += ".WithOnlyLocalData"; | 
| 608 else | 614 else | 
| 609 name += ".WithBothServerAndLocalData"; | 615 name += ".WithBothServerAndLocalData"; | 
| 610 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 616 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 
| 611 } | 617 } | 
| 612 | 618 | 
| 613 } // namespace autofill | 619 } // namespace autofill | 
| OLD | NEW |