Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h |
index f78c11e4c0bfaf6c4bb704cdf1ace2604e528708..0e248146a6a0ed383a997ed237d2c59b41387a13 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h |
@@ -15,7 +15,7 @@ class DataReductionProxyEventStore; |
class DataReductionProxyUsageStats; |
// Used to intercept responses that contain explicit and implicit signals |
-// to bypass the data reduction proxy. If the proxy should be bypassed, |
+// to bypass the Data Reduction Proxy. If the proxy should be bypassed, |
// the interceptor returns a new URLRequestHTTPJob that fetches the resource |
// without use of the proxy. |
class DataReductionProxyInterceptor : public net::URLRequestInterceptor { |
@@ -34,15 +34,28 @@ class DataReductionProxyInterceptor : public net::URLRequestInterceptor { |
net::URLRequest* request, |
net::NetworkDelegate* network_delegate) const override; |
- // Returns a new URLRequestHTTPJob if the response indicates that the data |
- // reduction proxy should be bypassed according to the rules in |protocol_|. |
- // Returns NULL otherwise. If a job is returned, the interceptor's |
- // URLRequestInterceptingJobFactory will restart the request. |
+ // Returns a new URLRequestHTTPJob if the redirect indicates that the Data |
+ // Reduction Proxy should be bypassed. See |MaybeInterceptResponseOrRedirect| |
+ // for more details. |
+ net::URLRequestJob* MaybeInterceptRedirect( |
+ net::URLRequest* request, net::NetworkDelegate* network_delegate, |
+ const GURL& location) const override; |
+ |
+ // Returns a new URLRequestHTTPJob if the response indicates that the Data |
+ // Reduction Proxy should be bypassed. See |MaybeInterceptResponseOrRedirect| |
+ // for more details. |
net::URLRequestJob* MaybeInterceptResponse( |
net::URLRequest* request, |
net::NetworkDelegate* network_delegate) const override; |
private: |
+ // Returns a new URLRequestHTTPJob if the response or redirect indicates that |
+ // the data reduction proxy should be bypassed according to the rules in |
+ // |bypass_protocol_|. Returns NULL otherwise. If a job is returned, the |
+ // interceptor's URLRequestInterceptingJobFactory will restart the request. |
+ net::URLRequestJob* MaybeInterceptResponseOrRedirect( |
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const; |
+ |
// Must outlive |this| if non-NULL. |
DataReductionProxyUsageStats* usage_stats_; |