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

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

Issue 2140253002: Add metrics to track HTTP/0.9 usage for main frames and subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 | « components/domain_reliability/util.cc ('k') | net/http/http_basic_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 8c05ad21940fde80d31acd1a3a251237c4b9dc9c..67f69502da2bae7b972ac7cfe475c51477fdbf58 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -709,14 +709,20 @@ void ResourceLoader::CallDidFinishLoading() {
}
void ResourceLoader::RecordHistograms() {
+ ResourceRequestInfoImpl* info = GetRequestInfo();
if (request_->response_info().network_accessed) {
- UMA_HISTOGRAM_ENUMERATION("Net.HttpResponseInfo.ConnectionInfo",
- request_->response_info().connection_info,
- net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS);
+ if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME) {
+ UMA_HISTOGRAM_ENUMERATION("Net.HttpResponseInfo.ConnectionInfo.MainFrame",
+ request_->response_info().connection_info,
+ net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS);
+ } else {
+ UMA_HISTOGRAM_ENUMERATION(
+ "Net.HttpResponseInfo.ConnectionInfo.SubResource",
+ request_->response_info().connection_info,
+ net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS);
+ }
}
- ResourceRequestInfoImpl* info = GetRequestInfo();
-
if (info->GetResourceType() == RESOURCE_TYPE_PREFETCH) {
PrefetchStatus status = STATUS_UNDEFINED;
TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time();
« no previous file with comments | « components/domain_reliability/util.cc ('k') | net/http/http_basic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698