ProjectingObserverChromeos: Drop DBusThreadManager dependency for better testing.
[chromium-blink-merge.git] / components / data_reduction_proxy / browser / data_reduction_proxy_delegate.h
blob11831a452436f54068bada19b249f2840b0e6d08
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_
8 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
9 #include "net/base/proxy_delegate.h"
10 #include "url/gurl.h"
12 namespace net {
13 class HostPortPair;
14 class HttpRequestHeaders;
15 class HttpResponseHeaders;
16 class ProxyInfo;
17 class ProxyServer;
18 class ProxyService;
19 class URLRequest;
22 namespace data_reduction_proxy {
24 class DataReductionProxyAuthRequestHandler;
26 class DataReductionProxyDelegate : public net::ProxyDelegate {
27 public:
28 explicit DataReductionProxyDelegate(
29 DataReductionProxyAuthRequestHandler* auth_handler);
31 virtual ~DataReductionProxyDelegate();
33 virtual void OnResolveProxy(const GURL& url,
34 int load_flags,
35 const net::ProxyService& proxy_service,
36 net::ProxyInfo* result) override;
38 virtual void OnFallback(const net::ProxyServer& bad_proxy,
39 int net_error) override;
41 virtual void OnBeforeSendHeaders(net::URLRequest* request,
42 const net::ProxyInfo& proxy_info,
43 net::HttpRequestHeaders* headers) override;
45 virtual void OnBeforeTunnelRequest(
46 const net::HostPortPair& proxy_server,
47 net::HttpRequestHeaders* extra_headers) override;
49 virtual void OnTunnelHeadersReceived(
50 const net::HostPortPair& origin,
51 const net::HostPortPair& proxy_server,
52 const net::HttpResponseHeaders& response_headers) override;
54 private:
55 DataReductionProxyAuthRequestHandler* auth_handler_;
57 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate);
60 } // namespace data_reduction_proxy
62 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_