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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2643773002: Restrict effective 2g blocking to cases where NQE says we are 2G-like. (Closed)
Patch Set: rebase Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 77a7519923c8cab78ee069ad832dccf75bf690e6..9cfa91a3c0ad2382dc369a6fe010894e4352f515 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -185,8 +185,6 @@ bool shouldDisallowFetchForMainFrameScript(ResourceRequest& request,
networkStateNotifier().connectionType() == WebConnectionTypeCellular2G;
WebEffectiveConnectionType effectiveConnection =
document.frame()->client()->getEffectiveConnectionType();
- const bool is2GOrLike2G =
- is2G || isConnectionEffectively2G(effectiveConnection);
return document.settings()
->getDisallowFetchForDocWrittenScriptsInMainFrame() ||
@@ -195,7 +193,7 @@ bool shouldDisallowFetchForMainFrameScript(ResourceRequest& request,
is2G) ||
(document.settings()
->getDisallowFetchForDocWrittenScriptsInMainFrameIfEffectively2G() &&
- is2GOrLike2G);
+ isConnectionEffectively2G(effectiveConnection));
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698