Home | History | Annotate | Download | only in browser
      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.
      4 
      5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_delegate.h"
      6 
      7 #include "net/base/host_port_pair.h"
      8 #include "net/http/http_request_headers.h"
      9 #include "net/http/http_response_headers.h"
     10 
     11 namespace data_reduction_proxy {
     12 
     13 DataReductionProxyDelegate::DataReductionProxyDelegate(
     14     DataReductionProxyAuthRequestHandler* auth_handler)
     15     : auth_handler_(auth_handler) {
     16   DCHECK(auth_handler);
     17 }
     18 
     19 DataReductionProxyDelegate::~DataReductionProxyDelegate() {
     20 }
     21 
     22 void DataReductionProxyDelegate::OnResolveProxy(
     23     const GURL& url,
     24     int load_flags,
     25     const net::ProxyService& proxy_service,
     26     net::ProxyInfo* result) {
     27 }
     28 
     29 void DataReductionProxyDelegate::OnFallback(const net::ProxyServer& bad_proxy,
     30                                             int net_error) {
     31 }
     32 
     33 void DataReductionProxyDelegate::OnBeforeSendHeaders(
     34     net::URLRequest* request,
     35     const net::ProxyInfo& proxy_info,
     36     net::HttpRequestHeaders* headers) {
     37 }
     38 
     39 void DataReductionProxyDelegate::OnBeforeTunnelRequest(
     40     const net::HostPortPair& proxy_server,
     41     net::HttpRequestHeaders* extra_headers) {
     42   auth_handler_->MaybeAddProxyTunnelRequestHandler(proxy_server, extra_headers);
     43 }
     44 
     45 void DataReductionProxyDelegate::OnTunnelHeadersReceived(
     46     const net::HostPortPair& origin,
     47     const net::HostPortPair& proxy_server,
     48     const net::HttpResponseHeaders& response_headers) {
     49 }
     50 
     51 }  // namespace data_reduction_proxy
     52