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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 14093027: Add histogram for image errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index f3a441b8a5a2a0e7d28e2d62382feb5762d39621..857d165613352d95d0dcf52bb34d462449c37007 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -756,6 +756,13 @@ void ResourceDispatcherHostImpl::DidFinishLoading(ResourceLoader* loader) {
kAllNetErrorCodes, arraysize(kAllNetErrorCodes)));
}
} else {
+ if (info->GetResourceType() == ResourceType::IMAGE) {
+ UMA_HISTOGRAM_CUSTOM_ENUMERATION(
+ "Net.ErrorCodesForImages",
+ -loader->request()->status().error(),
+ base::CustomHistogram::ArrayToCustomRanges(
+ kAllNetErrorCodes, arraysize(kAllNetErrorCodes)));
Ilya Sherman 2013/04/26 23:59:10 Can you use a sparse histogram here? (The corresp
jar (doing other things) 2013/04/27 00:48:58 +1 On 2013/04/26 23:59:10, Ilya Sherman wrote:
James Simonsen 2013/04/27 00:57:07 If we're going to do that, we should update all of
jar (doing other things) 2013/04/27 01:00:53 SGTM The list has gotten long (so memory utilizat
Stephen 2013/04/27 03:02:41 OK so IIUC the code here should be UMA_HISTOGRAM_S
Ilya Sherman 2013/04/27 23:06:23 Assuming that the expression "-loader->request()->
+ }
// This enumeration has "2" appended to distinguish it from older versions.
UMA_HISTOGRAM_CUSTOM_ENUMERATION(
"Net.ErrorCodesForSubresources2",
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698