ProjectingObserverChromeos: Drop DBusThreadManager dependency for better testing.
[chromium-blink-merge.git] / components / data_reduction_proxy / browser / data_reduction_proxy_delegate.cc
blob7d9dad0507d1f555b6084e0e5dda5b3f6ef55a7a
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 #include "components/data_reduction_proxy/browser/data_reduction_proxy_delegate.h"
7 #include "net/base/host_port_pair.h"
8 #include "net/http/http_request_headers.h"
9 #include "net/http/http_response_headers.h"
11 namespace data_reduction_proxy {
13 DataReductionProxyDelegate::DataReductionProxyDelegate(
14 DataReductionProxyAuthRequestHandler* auth_handler)
15 : auth_handler_(auth_handler) {
16 DCHECK(auth_handler);
19 DataReductionProxyDelegate::~DataReductionProxyDelegate() {
22 void DataReductionProxyDelegate::OnResolveProxy(
23 const GURL& url,
24 int load_flags,
25 const net::ProxyService& proxy_service,
26 net::ProxyInfo* result) {
29 void DataReductionProxyDelegate::OnFallback(const net::ProxyServer& bad_proxy,
30 int net_error) {
33 void DataReductionProxyDelegate::OnBeforeSendHeaders(
34 net::URLRequest* request,
35 const net::ProxyInfo& proxy_info,
36 net::HttpRequestHeaders* headers) {
39 void DataReductionProxyDelegate::OnBeforeTunnelRequest(
40 const net::HostPortPair& proxy_server,
41 net::HttpRequestHeaders* extra_headers) {
42 auth_handler_->MaybeAddProxyTunnelRequestHandler(proxy_server, extra_headers);
45 void DataReductionProxyDelegate::OnTunnelHeadersReceived(
46 const net::HostPortPair& origin,
47 const net::HostPortPair& proxy_server,
48 const net::HttpResponseHeaders& response_headers) {
51 } // namespace data_reduction_proxy