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

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

Issue 2213683003: Update Effective Connection Type only on main frame requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PS Created 4 years, 4 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
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index c7d0b424634b51003e76945a08bc32ed6f4996cb..acd9a39f3ef5d1582a15306e3e06f86acb43a65a 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -90,7 +90,9 @@ void PopulateResourceResponse(ResourceRequestInfoImpl* info,
response->head.effective_connection_type =
net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN;
- if (info->IsMainFrame()) {
+
+ if (info->IsMainFrame() &&
RyanSturm 2016/08/08 18:13:37 Is the info->IsMainFrame() part of this necessary?
tbansal1 2016/08/08 18:35:25 Done.
+ (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME)) {
RyanSturm 2016/08/08 18:13:37 #include "content/public/common/resource_type.h"
tbansal1 2016/08/08 18:35:25 Done.
net::NetworkQualityEstimator* estimator =
request->context()->network_quality_estimator();
if (estimator) {
« no previous file with comments | « no previous file | content/browser/loader/resource_loader_unittest.cc » ('j') | content/browser/loader/resource_loader_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698