When Retrier succeeds, record errors it encountered.
[chromium-blink-merge.git] / webkit / appcache / appcache_histograms.cc
blobf0b3c53120c2cf2d845299573fc501939abb5988
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
3 // found in the LICENSE file.
5 #include "webkit/appcache/appcache_histograms.h"
7 #include "base/metrics/histogram.h"
9 namespace appcache {
11 void AppCacheHistograms::CountInitResult(InitResultType init_result) {
12 UMA_HISTOGRAM_ENUMERATION(
13 "appcache.InitResult",
14 init_result, NUM_INIT_RESULT_TYPES);
17 void AppCacheHistograms::CountCheckResponseResult(
18 CheckResponseResultType result) {
19 UMA_HISTOGRAM_ENUMERATION(
20 "appcache.CheckResponseResult",
21 result, NUM_CHECK_RESPONSE_RESULT_TYPES);
24 void AppCacheHistograms::AddTaskQueueTimeSample(
25 const base::TimeDelta& duration) {
26 UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration);
29 void AppCacheHistograms::AddTaskRunTimeSample(
30 const base::TimeDelta& duration) {
31 UMA_HISTOGRAM_TIMES("appcache.TaskRunTime", duration);
34 void AppCacheHistograms::AddCompletionQueueTimeSample(
35 const base::TimeDelta& duration) {
36 UMA_HISTOGRAM_TIMES("appcache.CompletionQueueTime", duration);
39 void AppCacheHistograms::AddCompletionRunTimeSample(
40 const base::TimeDelta& duration) {
41 UMA_HISTOGRAM_TIMES("appcache.CompletionRunTime", duration);
44 void AppCacheHistograms::AddNetworkJobStartDelaySample(
45 const base::TimeDelta& duration) {
46 UMA_HISTOGRAM_TIMES("appcache.JobStartDelay.Network", duration);
49 void AppCacheHistograms::AddErrorJobStartDelaySample(
50 const base::TimeDelta& duration) {
51 UMA_HISTOGRAM_TIMES("appcache.JobStartDelay.Error", duration);
54 void AppCacheHistograms::AddAppCacheJobStartDelaySample(
55 const base::TimeDelta& duration) {
56 UMA_HISTOGRAM_TIMES("appcache.JobStartDelay.AppCache", duration);
59 void AppCacheHistograms::AddMissingManifestEntrySample() {
60 UMA_HISTOGRAM_BOOLEAN("appcache.MissingManifestEntry", true);
63 void AppCacheHistograms::AddMissingManifestDetectedAtCallsite(
64 MissingManifestCallsiteType callsite) {
65 UMA_HISTOGRAM_ENUMERATION(
66 "appcache.MissingManifestDetectedAtCallsite",
67 callsite, NUM_MISSING_MANIFEST_CALLSITE_TYPES);
70 } // namespace appcache