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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make LOAD_NORMAL consistent Created 6 years, 6 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: components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
index 2ec31e750924280bffa3c74a7e7d0787ca2fccd6..e77b04d437e3d3437b2c1cba13da7633f6a09791 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
@@ -18,6 +18,7 @@
#include "net/url_request/url_request_context.h"
#include "url/gurl.h"
+
namespace {
bool SetProxyServerFromGURL(const GURL& gurl,
net::ProxyServer* proxy_server) {
@@ -85,7 +86,17 @@ bool MaybeBypassProxyAndPrepareToRetry(
return true;
}
-
+void OnResolveProxyHandler(const GURL& url, int load_flags,
+ net::ProxyInfo* result) {
bengr 2014/07/02 18:46:43 move up a line.
rcs 2014/07/02 22:53:12 Breaks 80 chars. I changed it to have one arg per
+#if defined(SPDY_PROXY_AUTH_ORIGIN)
+ if ((load_flags & net::LOAD_BYPASS_DATA_REDUCTION_PROXY) &&
+ DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial() &&
+ !result->is_direct() &&
+ result->proxy_server().isDataReductionProxy()) {
bengr 2014/07/02 18:46:43 We're trying to deprecate ProxyServer::IsDatareduc
rcs 2014/07/02 22:53:12 Done.
+ result->UseDirect();
+ }
+#endif
+}
bool IsRequestIdempotent(const net::URLRequest* request) {
DCHECK(request);

Powered by Google App Engine
This is Rietveld 408576698