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

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

Issue 949323002: Collecting UMA metrics for the UnmaskPrompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: isherman comments Created 5 years, 9 months 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_PROMPT_EVENTS);
347 }
348
349 // static
350 void AutofillMetrics::LogRealPanResult(
351 AutofillClient::GetRealPanResult result) {
352 GetRealPanResult metric_result;
353 switch (result) {
354 case AutofillClient::SUCCESS:
355 metric_result = GET_REAL_PAN_RESULT_SUCCESS;
356 break;
357 case AutofillClient::TRY_AGAIN_FAILURE:
358 metric_result = GET_REAL_PAN_RESULT_TRY_AGAIN_FAILURE;
359 break;
360 case AutofillClient::PERMANENT_FAILURE:
361 metric_result = GET_REAL_PAN_RESULT_PERMANENT_FAILURE;
362 break;
363 case AutofillClient::NETWORK_ERROR:
364 metric_result = GET_REAL_PAN_RESULT_NETWORK_ERROR;
365 break;
366 }
367 UMA_HISTOGRAM_ENUMERATION("Autofill.UnmaskPrompt.GetRealPanResult",
368 metric_result,
369 NUM_GET_REAL_PAN_RESULTS);
370 }
371
372 // static
344 void AutofillMetrics::LogWalletErrorMetric(WalletErrorMetric metric) { 373 void AutofillMetrics::LogWalletErrorMetric(WalletErrorMetric metric) {
345 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.WalletErrors", metric, 374 UMA_HISTOGRAM_ENUMERATION("RequestAutocomplete.WalletErrors", metric,
346 NUM_WALLET_ERROR_METRICS); 375 NUM_WALLET_ERROR_METRICS);
347 } 376 }
348 377
349 // static 378 // static
350 void AutofillMetrics::LogWalletApiCallDuration( 379 void AutofillMetrics::LogWalletApiCallDuration(
351 WalletApiCallMetric metric, 380 WalletApiCallMetric metric,
352 const base::TimeDelta& duration) { 381 const base::TimeDelta& duration) {
353 LogUMAHistogramTimes("Wallet.ApiCallDuration." + 382 LogUMAHistogramTimes("Wallet.ApiCallDuration." +
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 else if (is_server_data_available_ && !is_local_data_available_) 633 else if (is_server_data_available_ && !is_local_data_available_)
605 name += ".WithOnlyServerData"; 634 name += ".WithOnlyServerData";
606 else if (!is_server_data_available_ && is_local_data_available_) 635 else if (!is_server_data_available_ && is_local_data_available_)
607 name += ".WithOnlyLocalData"; 636 name += ".WithOnlyLocalData";
608 else 637 else
609 name += ".WithBothServerAndLocalData"; 638 name += ".WithBothServerAndLocalData";
610 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); 639 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS);
611 } 640 }
612 641
613 } // namespace autofill 642 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698