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

Side by Side Diff: net/spdy/spdy_proxy_client_socket.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ 5 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_
6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
15 #include "net/base/host_port_pair.h" 15 #include "net/base/host_port_pair.h"
16 #include "net/base/load_timing_info.h" 16 #include "net/base/load_timing_info.h"
17 #include "net/base/net_log.h" 17 #include "net/base/net_log.h"
18 #include "net/http/http_auth_controller.h" 18 #include "net/http/http_auth_controller.h"
19 #include "net/http/http_request_headers.h" 19 #include "net/http/http_request_headers.h"
20 #include "net/http/http_request_info.h" 20 #include "net/http/http_request_info.h"
21 #include "net/http/http_response_info.h" 21 #include "net/http/http_response_info.h"
22 #include "net/http/proxy_client_socket.h" 22 #include "net/http/proxy_client_socket.h"
23 #include "net/spdy/spdy_http_stream.h" 23 #include "net/spdy/spdy_http_stream.h"
24 #include "net/spdy/spdy_protocol.h" 24 #include "net/spdy/spdy_protocol.h"
25 #include "net/spdy/spdy_read_queue.h" 25 #include "net/spdy/spdy_read_queue.h"
26 #include "net/spdy/spdy_session.h" 26 #include "net/spdy/spdy_session.h"
27 #include "net/spdy/spdy_stream.h" 27 #include "net/spdy/spdy_stream.h"
28 28
29
30 class GURL; 29 class GURL;
31 30
32 namespace net { 31 namespace net {
33 32
34 class AddressList; 33 class AddressList;
35 class HttpStream; 34 class HttpStream;
36 class IOBuffer; 35 class IOBuffer;
37 class SpdyStream; 36 class SpdyStream;
38 37
39 class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket, 38 class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
40 public SpdyStream::Delegate { 39 public SpdyStream::Delegate {
41 public: 40 public:
42 // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM 41 // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM
43 // CONNECT frame for |endpoint|. After the SYN_REPLY is received, 42 // CONNECT frame for |endpoint|. After the SYN_REPLY is received,
44 // any data read/written to the socket will be transferred in data 43 // any data read/written to the socket will be transferred in data
45 // frames. This object will set itself as |spdy_stream|'s delegate. 44 // frames. This object will set itself as |spdy_stream|'s delegate.
46 SpdyProxyClientSocket(const base::WeakPtr<SpdyStream>& spdy_stream, 45 SpdyProxyClientSocket(const base::WeakPtr<SpdyStream>& spdy_stream,
47 const std::string& user_agent, 46 const std::string& user_agent,
48 const HostPortPair& endpoint, 47 const HostPortPair& endpoint,
49 const GURL& url, 48 const GURL& url,
50 const HostPortPair& proxy_server, 49 const HostPortPair& proxy_server,
51 const BoundNetLog& source_net_log, 50 const BoundNetLog& source_net_log,
52 HttpAuthCache* auth_cache, 51 HttpAuthCache* auth_cache,
53 HttpAuthHandlerFactory* auth_handler_factory); 52 HttpAuthHandlerFactory* auth_handler_factory);
54 53
55
56 // On destruction Disconnect() is called. 54 // On destruction Disconnect() is called.
57 virtual ~SpdyProxyClientSocket(); 55 virtual ~SpdyProxyClientSocket();
58 56
59 // ProxyClientSocket methods: 57 // ProxyClientSocket methods:
60 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; 58 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE;
61 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; 59 virtual HttpStream* CreateConnectResponseStream() OVERRIDE;
62 virtual const scoped_refptr<HttpAuthController>& GetAuthController() const 60 virtual const scoped_refptr<HttpAuthController>& GetAuthController()
63 OVERRIDE; 61 const OVERRIDE;
64 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; 62 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE;
65 virtual bool IsUsingSpdy() const OVERRIDE; 63 virtual bool IsUsingSpdy() const OVERRIDE;
66 virtual NextProto GetProtocolNegotiated() const OVERRIDE; 64 virtual NextProto GetProtocolNegotiated() const OVERRIDE;
67 65
68 // StreamSocket implementation. 66 // StreamSocket implementation.
69 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 67 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
70 virtual void Disconnect() OVERRIDE; 68 virtual void Disconnect() OVERRIDE;
71 virtual bool IsConnected() const OVERRIDE; 69 virtual bool IsConnected() const OVERRIDE;
72 virtual bool IsConnectedAndIdle() const OVERRIDE; 70 virtual bool IsConnectedAndIdle() const OVERRIDE;
73 virtual const BoundNetLog& NetLog() const OVERRIDE; 71 virtual const BoundNetLog& NetLog() const OVERRIDE;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; 164 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_;
167 165
168 const BoundNetLog net_log_; 166 const BoundNetLog net_log_;
169 167
170 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); 168 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket);
171 }; 169 };
172 170
173 } // namespace net 171 } // namespace net
174 172
175 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ 173 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698