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

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: Use enum 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
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_loader_unittest.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 c7d0b424634b51003e76945a08bc32ed6f4996cb..98938e6aab69b9e750fb2e00c76008c2fee30856 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -32,6 +32,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
#include "content/public/common/resource_response.h"
+#include "content/public/common/resource_type.h"
#include "content/public/common/security_style.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
@@ -90,7 +91,9 @@ void PopulateResourceResponse(ResourceRequestInfoImpl* info,
response->head.effective_connection_type =
net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN;
- if (info->IsMainFrame()) {
+
+ if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME) {
+ DCHECK(info->IsMainFrame());
net::NetworkQualityEstimator* estimator =
request->context()->network_quality_estimator();
if (estimator) {
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698