Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 785953004: Add histogram for "scan credit card" usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 267
268 // static 268 // static
269 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) { 269 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) {
270 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); 270 DCHECK_LT(metric, NUM_INFO_BAR_METRICS);
271 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric, 271 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric,
272 NUM_INFO_BAR_METRICS); 272 NUM_INFO_BAR_METRICS);
273 } 273 }
274 274
275 // static 275 // static
276 void AutofillMetrics::LogScanCreditCardPromptMetric(
277 ScanCreditCardPromptMetric metric) {
278 DCHECK_LT(metric, NUM_SCAN_CREDIT_CARD_PROMPT_METRICS);
279 UMA_HISTOGRAM_ENUMERATION("Autofill.ScanCreditCardPrompt", metric,
280 NUM_SCAN_CREDIT_CARD_PROMPT_METRICS);
281 }
282
283 // static
276 void AutofillMetrics::LogDialogDismissalState(DialogDismissalState state) { 284 void AutofillMetrics::LogDialogDismissalState(DialogDismissalState state) {
277 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.DismissalState", 285 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.DismissalState",
278 state, NUM_DIALOG_DISMISSAL_STATES); 286 state, NUM_DIALOG_DISMISSAL_STATES);
279 } 287 }
280 288
281 // static 289 // static
282 void AutofillMetrics::LogDialogInitialUserState( 290 void AutofillMetrics::LogDialogInitialUserState(
283 DialogInitialUserStateMetric user_type) { 291 DialogInitialUserStateMetric user_type) {
284 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.InitialUserState", 292 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.InitialUserState",
285 user_type, NUM_DIALOG_INITIAL_USER_STATE_METRICS); 293 user_type, NUM_DIALOG_INITIAL_USER_STATE_METRICS);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 454
447 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const { 455 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const {
448 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); 456 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles);
449 } 457 }
450 458
451 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) const { 459 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) const {
452 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions); 460 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions);
453 } 461 }
454 462
455 } // namespace autofill 463 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698