| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 258 } |
| 259 | 259 |
| 260 // static | 260 // static |
| 261 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) { | 261 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) { |
| 262 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); | 262 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); |
| 263 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric, | 263 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric, |
| 264 NUM_INFO_BAR_METRICS); | 264 NUM_INFO_BAR_METRICS); |
| 265 } | 265 } |
| 266 | 266 |
| 267 // static | 267 // static |
| 268 void AutofillMetrics::LogCreditCardFillingInfoBarMetric(InfoBarMetric metric) { |
| 269 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); |
| 270 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardFillingInfoBar", metric, |
| 271 NUM_INFO_BAR_METRICS); |
| 272 } |
| 273 |
| 274 // static |
| 268 void AutofillMetrics::LogSaveCardPromptMetric(SaveCardPromptMetric metric, | 275 void AutofillMetrics::LogSaveCardPromptMetric(SaveCardPromptMetric metric, |
| 269 bool is_uploading, | 276 bool is_uploading, |
| 270 bool is_reshow) { | 277 bool is_reshow) { |
| 271 DCHECK_LT(metric, NUM_SAVE_CARD_PROMPT_METRICS); | 278 DCHECK_LT(metric, NUM_SAVE_CARD_PROMPT_METRICS); |
| 272 std::string destination = is_uploading ? ".Upload" : ".Local"; | 279 std::string destination = is_uploading ? ".Upload" : ".Local"; |
| 273 std::string show = is_reshow ? ".Reshows" : ".FirstShow"; | 280 std::string show = is_reshow ? ".Reshows" : ".FirstShow"; |
| 274 LogUMAHistogramEnumeration( | 281 LogUMAHistogramEnumeration( |
| 275 "Autofill.SaveCreditCardPrompt" + destination + show, metric, | 282 "Autofill.SaveCreditCardPrompt" + destination + show, metric, |
| 276 NUM_SAVE_CARD_PROMPT_METRICS); | 283 NUM_SAVE_CARD_PROMPT_METRICS); |
| 277 } | 284 } |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 else if (is_server_data_available_ && !is_local_data_available_) | 834 else if (is_server_data_available_ && !is_local_data_available_) |
| 828 name += ".WithOnlyServerData"; | 835 name += ".WithOnlyServerData"; |
| 829 else if (!is_server_data_available_ && is_local_data_available_) | 836 else if (!is_server_data_available_ && is_local_data_available_) |
| 830 name += ".WithOnlyLocalData"; | 837 name += ".WithOnlyLocalData"; |
| 831 else | 838 else |
| 832 name += ".WithBothServerAndLocalData"; | 839 name += ".WithBothServerAndLocalData"; |
| 833 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 840 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); |
| 834 } | 841 } |
| 835 | 842 |
| 836 } // namespace autofill | 843 } // namespace autofill |
| OLD | NEW |