Home | History | Annotate | Download | only in http
      1 // Copyright (c) 2011 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 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
      6 #define NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
      7 #pragma once
      8 
      9 #include "base/memory/ref_counted.h"
     10 
     11 namespace net {
     12 
     13 class HostPortPair;
     14 class HttpNetworkSession;
     15 class HttpProxyClientSocketPool;
     16 class HttpStreamFactory;
     17 class ProxyService;
     18 class SOCKSClientSocketPool;
     19 class SSLClientSocketPool;
     20 class TransportClientSocketPool;
     21 
     22 class HttpNetworkSessionPeer {
     23  public:
     24   explicit HttpNetworkSessionPeer(
     25       const scoped_refptr<HttpNetworkSession>& session);
     26   ~HttpNetworkSessionPeer();
     27 
     28   void SetTransportSocketPool(TransportClientSocketPool* pool);
     29 
     30   void SetSocketPoolForSOCKSProxy(
     31       const HostPortPair& socks_proxy,
     32       SOCKSClientSocketPool* pool);
     33 
     34   void SetSocketPoolForHTTPProxy(
     35       const HostPortPair& http_proxy,
     36       HttpProxyClientSocketPool* pool);
     37 
     38   void SetSSLSocketPool(SSLClientSocketPool* pool);
     39 
     40   void SetSocketPoolForSSLWithProxy(
     41       const HostPortPair& proxy_host,
     42       SSLClientSocketPool* pool);
     43 
     44   void SetProxyService(ProxyService* proxy_service);
     45 
     46   void SetHttpStreamFactory(HttpStreamFactory* http_stream_factory);
     47 
     48  private:
     49   const scoped_refptr<HttpNetworkSession> session_;
     50 
     51   DISALLOW_COPY_AND_ASSIGN(HttpNetworkSessionPeer);
     52 };
     53 
     54 }  // namespace net
     55 
     56 #endif  // NET_HTTP_HTTP_NETWORK_SESSION_PEER_H_
     57