OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/autofill_metrics.h" | 5 #include "components/autofill/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/time.h" | 9 #include "base/time.h" |
10 #include "components/autofill/browser/autofill_type.h" | 10 #include "components/autofill/browser/autofill_type.h" |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 | 441 |
442 case AUTOCHECKOUT_SUCCEEDED: | 442 case AUTOCHECKOUT_SUCCEEDED: |
443 suffix = "Succeeded"; | 443 suffix = "Succeeded"; |
444 break; | 444 break; |
445 } | 445 } |
446 | 446 |
447 LogUMAHistogramLongTimes("Autocheckout.FlowDuration", duration); | 447 LogUMAHistogramLongTimes("Autocheckout.FlowDuration", duration); |
448 LogUMAHistogramLongTimes("Autocheckout.FlowDuration." + suffix, duration); | 448 LogUMAHistogramLongTimes("Autocheckout.FlowDuration." + suffix, duration); |
449 } | 449 } |
450 | 450 |
451 void AutofillMetrics::LogAutocheckoutWhitelistDownloadDuration( | |
452 const base::TimeDelta& duration, WhitelistDownloadStatus status) const { | |
453 std::string suffix; | |
454 switch (status) { | |
455 case WHITELIST_DOWNLOAD_FAILED: | |
456 suffix = "Failed"; | |
457 break; | |
458 | |
459 case WHITELIST_DOWNLOAD_SUCCEEDED: | |
460 suffix = "Succeeded"; | |
461 break; | |
462 } | |
463 | |
464 LogUMAHistogramLongTimes("Autocheckout.WhitelistDownloadDuration", duration); | |
ahutter
2013/04/16 17:56:54
I think you want to use LogUMAHistogramTimes since
benquan
2013/04/17 01:51:30
Done.
| |
465 LogUMAHistogramLongTimes( | |
466 "Autocheckout.WhitelistDownloadDuration." + suffix, duration); | |
467 } | |
468 | |
451 void AutofillMetrics::LogDeveloperEngagementMetric( | 469 void AutofillMetrics::LogDeveloperEngagementMetric( |
452 DeveloperEngagementMetric metric) const { | 470 DeveloperEngagementMetric metric) const { |
453 DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS); | 471 DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS); |
454 | 472 |
455 UMA_HISTOGRAM_ENUMERATION("Autofill.DeveloperEngagement", metric, | 473 UMA_HISTOGRAM_ENUMERATION("Autofill.DeveloperEngagement", metric, |
456 NUM_DEVELOPER_ENGAGEMENT_METRICS); | 474 NUM_DEVELOPER_ENGAGEMENT_METRICS); |
457 } | 475 } |
458 | 476 |
459 void AutofillMetrics::LogHeuristicTypePrediction( | 477 void AutofillMetrics::LogHeuristicTypePrediction( |
460 FieldTypeQualityMetric metric, | 478 FieldTypeQualityMetric metric, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
566 const std::string& experiment_id) const { | 584 const std::string& experiment_id) const { |
567 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 585 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
568 } | 586 } |
569 | 587 |
570 void AutofillMetrics::LogServerExperimentIdForUpload( | 588 void AutofillMetrics::LogServerExperimentIdForUpload( |
571 const std::string& experiment_id) const { | 589 const std::string& experiment_id) const { |
572 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 590 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
573 } | 591 } |
574 | 592 |
575 } // namespace autofill | 593 } // namespace autofill |
OLD | NEW |