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

Side by Side Diff: chrome/browser/autofill/autofill_metrics.cc

Issue 7740070: Add metrics to measure time elapsed between form load and form submission with or without Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Once more, with feeling Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/autofill/autofill_metrics.h" 5 #include "chrome/browser/autofill/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/time.h"
9 #include "chrome/browser/autofill/autofill_type.h" 10 #include "chrome/browser/autofill/autofill_type.h"
10 #include "chrome/browser/autofill/form_structure.h" 11 #include "chrome/browser/autofill/form_structure.h"
11 #include "webkit/glue/form_data.h" 12 #include "webkit/glue/form_data.h"
12 13
13 namespace { 14 namespace {
14 15
15 // Server experiments we support. 16 // Server experiments we support.
16 enum ServerExperiment { 17 enum ServerExperiment {
17 NO_EXPERIMENT = 0, 18 NO_EXPERIMENT = 0,
18 UNKNOWN_EXPERIMENT, 19 UNKNOWN_EXPERIMENT,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 NUM_SERVER_QUERY_METRICS); 292 NUM_SERVER_QUERY_METRICS);
292 } 293 }
293 294
294 void AutofillMetrics::LogUserHappinessMetric(UserHappinessMetric metric) const { 295 void AutofillMetrics::LogUserHappinessMetric(UserHappinessMetric metric) const {
295 DCHECK(metric < NUM_USER_HAPPINESS_METRICS); 296 DCHECK(metric < NUM_USER_HAPPINESS_METRICS);
296 297
297 UMA_HISTOGRAM_ENUMERATION("Autofill.UserHappiness", metric, 298 UMA_HISTOGRAM_ENUMERATION("Autofill.UserHappiness", metric,
298 NUM_USER_HAPPINESS_METRICS); 299 NUM_USER_HAPPINESS_METRICS);
299 } 300 }
300 301
302 void AutofillMetrics::LogFormFillDurationFromLoadWithAutofill(
303 const base::TimeDelta& duration) const {
304 UMA_HISTOGRAM_CUSTOM_TIMES("Autofill.FillDuration.FromLoad.WithAutofill",
305 duration,
306 base::TimeDelta::FromMilliseconds(100),
307 base::TimeDelta::FromMinutes(10),
308 50);
309 }
310
311 void AutofillMetrics::LogFormFillDurationFromLoadWithoutAutofill(
312 const base::TimeDelta& duration) const {
313 UMA_HISTOGRAM_CUSTOM_TIMES("Autofill.FillDuration.FromLoad.WithoutAutofill",
314 duration,
315 base::TimeDelta::FromMilliseconds(100),
316 base::TimeDelta::FromMinutes(10),
317 50);
318 }
319
320 void AutofillMetrics::LogFormFillDurationFromInteractionWithAutofill(
321 const base::TimeDelta& duration) const {
322 UMA_HISTOGRAM_CUSTOM_TIMES(
323 "Autofill.FillDuration.FromInteraction.WithAutofill",
324 duration,
325 base::TimeDelta::FromMilliseconds(100),
326 base::TimeDelta::FromMinutes(10),
327 50);
328 }
329
330 void AutofillMetrics::LogFormFillDurationFromInteractionWithoutAutofill(
331 const base::TimeDelta& duration) const {
332 UMA_HISTOGRAM_CUSTOM_TIMES(
333 "Autofill.FillDuration.FromInteraction.WithoutAutofill",
334 duration,
335 base::TimeDelta::FromMilliseconds(100),
336 base::TimeDelta::FromMinutes(10),
337 50);
338 }
339
301 void AutofillMetrics::LogIsAutofillEnabledAtStartup(bool enabled) const { 340 void AutofillMetrics::LogIsAutofillEnabledAtStartup(bool enabled) const {
302 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.Startup", enabled); 341 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.Startup", enabled);
303 } 342 }
304 343
305 void AutofillMetrics::LogIsAutofillEnabledAtPageLoad(bool enabled) const { 344 void AutofillMetrics::LogIsAutofillEnabledAtPageLoad(bool enabled) const {
306 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.PageLoad", enabled); 345 UMA_HISTOGRAM_BOOLEAN("Autofill.IsEnabled.PageLoad", enabled);
307 } 346 }
308 347
309 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const { 348 void AutofillMetrics::LogStoredProfileCount(size_t num_profiles) const {
310 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles); 349 UMA_HISTOGRAM_COUNTS("Autofill.StoredProfileCount", num_profiles);
311 } 350 }
312 351
313 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) const { 352 void AutofillMetrics::LogAddressSuggestionsCount(size_t num_suggestions) const {
314 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions); 353 UMA_HISTOGRAM_COUNTS("Autofill.AddressSuggestionsCount", num_suggestions);
315 } 354 }
316 355
317 void AutofillMetrics::LogServerExperimentIdForQuery( 356 void AutofillMetrics::LogServerExperimentIdForQuery(
318 const std::string& experiment_id) const { 357 const std::string& experiment_id) const {
319 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); 358 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id);
320 } 359 }
321 360
322 void AutofillMetrics::LogServerExperimentIdForUpload( 361 void AutofillMetrics::LogServerExperimentIdForUpload(
323 const std::string& experiment_id) const { 362 const std::string& experiment_id) const {
324 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); 363 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id);
325 } 364 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_metrics.h ('k') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698