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

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

Issue 686343002: Add MaybeInterceptRedirect/Response to URLRequestInterceptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
new file mode 100644
index 0000000000000000000000000000000000000000..eda4d9c5c7bceb36881e24bf8a3106018a2aa5b8
--- /dev/null
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_INTERCEPTOR_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_INTERCEPTOR_H_
+
+#include "net/url_request/url_request_interceptor.h"
+
+namespace data_reduction_proxy {
+class DataReductionProxyParams;
+class DataReductionProxyUsageStats;
+
+class DataReductionProxyInterceptor : public net::URLRequestInterceptor {
+ public:
+ DataReductionProxyInterceptor(DataReductionProxyParams* params,
+ DataReductionProxyUsageStats* stats);
+ ~DataReductionProxyInterceptor() override;
+
+ // Override from net::URLRequestInterceptor:
+ net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override;
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override;
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) const override;
+
+ private:
+ DataReductionProxyParams* params_;
+ DataReductionProxyUsageStats* usage_stats_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyInterceptor);
+};
+
+} // namespace data_reduction_proxy
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_INTERCEPTOR_H_

Powered by Google App Engine
This is Rietveld 408576698