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

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

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr's nit Created 6 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
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 561b2159a17d2d064347eec7e0c828bf5a18bb1d..c900cd82c5e8713db96f2407e3a2b8c6571b93f1 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1987,6 +1987,11 @@ int ResourceDispatcherHostImpl::BuildLoadFlagsForRequest(
load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
}
+ // Add a flag to selectively bypass the data reduction proxy if the resource
+ // type is not an image.
+ if (request_data.resource_type != ResourceType::IMAGE)
+ load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
+
return load_flags;
}

Powered by Google App Engine
This is Rietveld 408576698