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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h

Issue 836583002: Add support for field trial group to relax missing via header bypass logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused include from aw_url_request_context_getter.cc Created 5 years, 11 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_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 1f0acc4a99ff1ae6c63f969564e87804221dc98d..a0cb781e39ca319dd0022eb801eab25fa6b16934 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
@@ -5,11 +5,13 @@
#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_INTERCEPTOR_H_
#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_INTERCEPTOR_H_
+#include "base/memory/scoped_ptr.h"
#include "net/url_request/url_request_interceptor.h"
namespace data_reduction_proxy {
class DataReductionProxyEventStore;
class DataReductionProxyParams;
+class DataReductionProxyBypassProtocol;
class DataReductionProxyUsageStats;
// Used to intercept responses that contain explicit and implicit signals
@@ -33,10 +35,9 @@ class DataReductionProxyInterceptor : public net::URLRequestInterceptor {
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
- // data_reduction_proxy_protocol.cc. Returns NULL otherwise. If a job is
- // returned, the interceptor's URLRequestInterceptingJobFactory will restart
- // the request.
+ // 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.
net::URLRequestJob* MaybeInterceptResponse(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override;
@@ -51,6 +52,11 @@ class DataReductionProxyInterceptor : public net::URLRequestInterceptor {
// Must outlive |this|.
DataReductionProxyEventStore* event_store_;
+ // Object responsible for identifying cases when a response should cause the
+ // data reduction proxy to be bypassed, and for triggering proxy bypasses in
+ // these cases.
+ scoped_ptr<DataReductionProxyBypassProtocol> bypass_protocol_;
+
DISALLOW_COPY_AND_ASSIGN(DataReductionProxyInterceptor);
};

Powered by Google App Engine
This is Rietveld 408576698