Chromium Code Reviews| Index: webkit/browser/appcache/appcache_histograms.cc |
| diff --git a/webkit/browser/appcache/appcache_histograms.cc b/webkit/browser/appcache/appcache_histograms.cc |
| index dd00eb9c382847bf4f62b1da5dd3ecd4c2a3940a..6b5299b7c4b9715ad8c29c7c30fb15f954eede18 100644 |
| --- a/webkit/browser/appcache/appcache_histograms.cc |
| +++ b/webkit/browser/appcache/appcache_histograms.cc |
| @@ -8,6 +8,12 @@ |
| namespace appcache { |
| +static std::string OriginToCustomHistogramSuffix(const GURL& origin_url) { |
| + if (origin_url.host() == "docs.google.com") |
| + return ".Docs"; |
| + return std::string(); |
| +} |
| + |
| void AppCacheHistograms::CountInitResult(InitResultType init_result) { |
| UMA_HISTOGRAM_ENUMERATION( |
| "appcache.InitResult", |
| @@ -22,6 +28,24 @@ void AppCacheHistograms::CountCorruptionDetected() { |
| UMA_HISTOGRAM_BOOLEAN("appcache.CorruptionDetected", true); |
| } |
| +void AppCacheHistograms::CountUpdateJobResult( |
| + AppCacheUpdateJob::ResultType result, |
| + const GURL& origin_url) { |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "appcache.UpdateJobResult", |
| + result, AppCacheUpdateJob::NUM_UPDATE_JOB_RESULT_TYPES); |
| + |
| + const std::string suffix = OriginToCustomHistogramSuffix(origin_url); |
|
michaeln
2014/02/15 00:03:56
This is copy/pasted from what idb does for open re
jsbell
2014/02/15 00:23:54
... which we swiped from HostToCustomHistogramSuff
|
| + if (!suffix.empty()) { |
| + base::LinearHistogram::FactoryGet( |
| + "appcache.UpdateJobResult" + suffix, |
| + 1, |
| + AppCacheUpdateJob::NUM_UPDATE_JOB_RESULT_TYPES, |
| + AppCacheUpdateJob::NUM_UPDATE_JOB_RESULT_TYPES + 1, |
| + base::HistogramBase::kUmaTargetedHistogramFlag)->Add(result); |
| + } |
| +} |
| + |
| void AppCacheHistograms::CountCheckResponseResult( |
| CheckResponseResultType result) { |
| UMA_HISTOGRAM_ENUMERATION( |
| @@ -29,6 +53,7 @@ void AppCacheHistograms::CountCheckResponseResult( |
| result, NUM_CHECK_RESPONSE_RESULT_TYPES); |
| } |
| + |
|
jsbell
2014/02/15 00:23:54
Delete extra blank line
|
| void AppCacheHistograms::AddTaskQueueTimeSample( |
| const base::TimeDelta& duration) { |
| UMA_HISTOGRAM_TIMES("appcache.TaskQueueTime", duration); |