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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmitting with upstream branch set to branch from issue 1680893002 Created 4 years, 10 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/core/browser/data_reduction_proxy_delegate.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
index d491cc89548e632f2a10a77ca65bd92aeb74358c..84092a8824229aca73c06357df71cc4cc705b622 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
@@ -42,24 +42,26 @@ DataReductionProxyDelegate::DataReductionProxyDelegate(
DCHECK(net_log);
}
DataReductionProxyDelegate::~DataReductionProxyDelegate() {
}
void DataReductionProxyDelegate::OnResolveProxy(
const GURL& url,
int load_flags,
const net::ProxyService& proxy_service,
+ const std::string& method,
bengr 2016/02/16 20:00:13 Move the method to just after the url.
RyanSturm 2016/02/17 21:46:10 Done.
net::ProxyInfo* result) {
DCHECK(result);
OnResolveProxyHandler(url, load_flags, configurator_->GetProxyConfig(),
- proxy_service.proxy_retry_info(), config_, result);
+ proxy_service.proxy_retry_info(), config_, method,
+ result);
}
void DataReductionProxyDelegate::OnTunnelConnectCompleted(
const net::HostPortPair& endpoint,
const net::HostPortPair& proxy_server,
int net_error) {
if (config_->IsDataReductionProxy(proxy_server, NULL)) {
UMA_HISTOGRAM_SPARSE_SLOWLY("DataReductionProxy.HTTPConnectCompleted",
std::abs(net_error));
}
@@ -105,28 +107,29 @@ void DataReductionProxyDelegate::OnTunnelHeadersReceived(
const net::HostPortPair& origin,
const net::HostPortPair& proxy_server,
const net::HttpResponseHeaders& response_headers) {
}
void OnResolveProxyHandler(const GURL& url,
int load_flags,
const net::ProxyConfig& data_reduction_proxy_config,
const net::ProxyRetryInfoMap& proxy_retry_info,
const DataReductionProxyConfig* config,
+ const std::string& method,
bengr 2016/02/16 20:00:13 Move the method to just after the url.
RyanSturm 2016/02/17 21:46:10 Done.
net::ProxyInfo* result) {
DCHECK(config);
DCHECK(result->is_empty() || result->is_direct() ||
!config->IsDataReductionProxy(result->proxy_server().host_port_pair(),
NULL));
if (!data_reduction_proxy_config.is_valid() ||
!result->proxy_server().is_direct() || result->proxy_list().size() != 1 ||
- url.SchemeIsWSOrWSS())
+ url.SchemeIsWSOrWSS() || method == "POST")
return;
net::ProxyInfo data_reduction_proxy_info;
data_reduction_proxy_config.proxy_rules().Apply(url,
&data_reduction_proxy_info);
data_reduction_proxy_info.DeprioritizeBadProxies(proxy_retry_info);
if (!data_reduction_proxy_info.proxy_server().is_direct())
result->OverrideProxyList(data_reduction_proxy_info.proxy_list());
}

Powered by Google App Engine
This is Rietveld 408576698