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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added net/base/test_proxy_delegate.{h,cc} 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA TE_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA TE_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA TE_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DELEGA TE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/base/proxy_delegate.h" 9 #include "net/base/proxy_delegate.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 16 matching lines...) Expand all
27 class DataReductionProxyDelegate : public net::ProxyDelegate { 27 class DataReductionProxyDelegate : public net::ProxyDelegate {
28 public: 28 public:
29 // ProxyDelegate instance is owned by io_thread. |auth_handler| and |config| 29 // ProxyDelegate instance is owned by io_thread. |auth_handler| and |config|
30 // outlives this class instance. 30 // outlives this class instance.
31 explicit DataReductionProxyDelegate( 31 explicit DataReductionProxyDelegate(
32 DataReductionProxyRequestOptions* request_options, 32 DataReductionProxyRequestOptions* request_options,
33 DataReductionProxyConfig* config); 33 DataReductionProxyConfig* config);
34 34
35 ~DataReductionProxyDelegate() override; 35 ~DataReductionProxyDelegate() override;
36 36
37 // net::ProxyDelegate implementation:
37 void OnResolveProxy(const GURL& url, 38 void OnResolveProxy(const GURL& url,
38 int load_flags, 39 int load_flags,
39 const net::ProxyService& proxy_service, 40 const net::ProxyService& proxy_service,
40 net::ProxyInfo* result) override; 41 net::ProxyInfo* result) override;
41
42 void OnFallback(const net::ProxyServer& bad_proxy, int net_error) override; 42 void OnFallback(const net::ProxyServer& bad_proxy, int net_error) override;
43
44 void OnBeforeSendHeaders(net::URLRequest* request, 43 void OnBeforeSendHeaders(net::URLRequest* request,
45 const net::ProxyInfo& proxy_info, 44 const net::ProxyInfo& proxy_info,
46 net::HttpRequestHeaders* headers) override; 45 net::HttpRequestHeaders* headers) override;
47
48 void OnBeforeTunnelRequest(const net::HostPortPair& proxy_server, 46 void OnBeforeTunnelRequest(const net::HostPortPair& proxy_server,
49 net::HttpRequestHeaders* extra_headers) override; 47 net::HttpRequestHeaders* extra_headers) override;
50
51 void OnTunnelConnectCompleted(const net::HostPortPair& endpoint, 48 void OnTunnelConnectCompleted(const net::HostPortPair& endpoint,
52 const net::HostPortPair& proxy_server, 49 const net::HostPortPair& proxy_server,
53 int net_error) override; 50 int net_error) override;
54 51 bool IsTrustedSpdyProxy(const net::ProxyServer& proxy_server) override;
55 void OnTunnelHeadersReceived( 52 void OnTunnelHeadersReceived(
56 const net::HostPortPair& origin, 53 const net::HostPortPair& origin,
57 const net::HostPortPair& proxy_server, 54 const net::HostPortPair& proxy_server,
58 const net::HttpResponseHeaders& response_headers) override; 55 const net::HttpResponseHeaders& response_headers) override;
59 56
60 private: 57 private:
61 DataReductionProxyRequestOptions* request_options_; 58 DataReductionProxyRequestOptions* request_options_;
62 const DataReductionProxyConfig* config_; 59 const DataReductionProxyConfig* config_;
63 60
64 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate); 61 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate);
65 }; 62 };
66 63
67 } // namespace data_reduction_proxy 64 } // namespace data_reduction_proxy
68 65
69 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DEL EGATE_H_ 66 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DEL EGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698