Chromium Code Reviews| 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()); |
| } |