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

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

Issue 880353002: [Autofill] Log the number of autofill profiles available at form submission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved log statement Created 5 years, 10 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void AutofillMetrics::LogIsAutofillEnabledAtPageLoad(bool enabled) { 454 void AutofillMetrics::LogIsAutofillEnabledAtPageLoad(bool enabled) {
455 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.PageLoad", enabled); 455 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.PageLoad", enabled);
456 } 456 }
457 457
458 // static 458 // static
459 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) { 459 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) {
460 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); 460 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles);
461 } 461 }
462 462
463 // static 463 // static
464 void AutofillMetrics::LogNumberOfProfilesAtAutofillableFormSubmission(
465 size_t num_profiles) {
466 UMA_HISTOGRAM_COUNTS(
467 "Autofill.StoredProfileCountAtAutofillableFormSubmission", num_profiles);
468 }
469
470 // static
464 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) { 471 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) {
465 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions); 472 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions);
466 } 473 }
467 474
468 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card) 475 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card)
469 : is_for_credit_card_(is_for_credit_card), 476 : is_for_credit_card_(is_for_credit_card),
470 is_server_data_available_(false), 477 is_server_data_available_(false),
471 is_local_data_available_(false), 478 is_local_data_available_(false),
472 has_logged_interacted_(false) {}; 479 has_logged_interacted_(false) {};
473 480
(...skipping 21 matching lines...) Expand all
495 else if (is_server_data_available_ && !is_local_data_available_) 502 else if (is_server_data_available_ && !is_local_data_available_)
496 name += ".WithOnlyServerData"; 503 name += ".WithOnlyServerData";
497 else if (!is_server_data_available_ && is_local_data_available_) 504 else if (!is_server_data_available_ && is_local_data_available_)
498 name += ".WithOnlyLocalData"; 505 name += ".WithOnlyLocalData";
499 else 506 else
500 name += ".WithBothServerAndLocalData"; 507 name += ".WithBothServerAndLocalData";
501 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); 508 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS);
502 } 509 }
503 510
504 } // namespace autofill 511 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_metrics.h ('k') | components/autofill/core/browser/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698