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

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

Issue 8801004: base::Bind: Convert StreamSocket::Connect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 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 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <list> 10 #include <list>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // On destruction Disconnect() is called. 54 // On destruction Disconnect() is called.
55 virtual ~SpdyProxyClientSocket(); 55 virtual ~SpdyProxyClientSocket();
56 56
57 // ProxyClientSocket methods: 57 // ProxyClientSocket methods:
58 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; 58 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE;
59 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; 59 virtual HttpStream* CreateConnectResponseStream() OVERRIDE;
60 virtual int RestartWithAuth(OldCompletionCallback* callback) OVERRIDE; 60 virtual int RestartWithAuth(OldCompletionCallback* callback) OVERRIDE;
61 virtual const scoped_refptr<HttpAuthController>& auth_controller() OVERRIDE; 61 virtual const scoped_refptr<HttpAuthController>& auth_controller() OVERRIDE;
62 62
63 // StreamSocket methods: 63 // StreamSocket implementation.
64 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; 64 virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
65 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
65 virtual void Disconnect() OVERRIDE; 66 virtual void Disconnect() OVERRIDE;
66 virtual bool IsConnected() const OVERRIDE; 67 virtual bool IsConnected() const OVERRIDE;
67 virtual bool IsConnectedAndIdle() const OVERRIDE; 68 virtual bool IsConnectedAndIdle() const OVERRIDE;
68 virtual const BoundNetLog& NetLog() const OVERRIDE; 69 virtual const BoundNetLog& NetLog() const OVERRIDE;
69 virtual void SetSubresourceSpeculation() OVERRIDE; 70 virtual void SetSubresourceSpeculation() OVERRIDE;
70 virtual void SetOmniboxSpeculation() OVERRIDE; 71 virtual void SetOmniboxSpeculation() OVERRIDE;
71 virtual bool WasEverUsed() const OVERRIDE; 72 virtual bool WasEverUsed() const OVERRIDE;
72 virtual bool UsingTCPFastOpen() const OVERRIDE; 73 virtual bool UsingTCPFastOpen() const OVERRIDE;
73 virtual int64 NumBytesRead() const OVERRIDE; 74 virtual int64 NumBytesRead() const OVERRIDE;
74 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 75 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 int PopulateUserReadBuffer(); 124 int PopulateUserReadBuffer();
124 125
125 OldCompletionCallbackImpl<SpdyProxyClientSocket> io_callback_; 126 OldCompletionCallbackImpl<SpdyProxyClientSocket> io_callback_;
126 State next_state_; 127 State next_state_;
127 128
128 // Pointer to the SPDY Stream that this sits on top of. 129 // Pointer to the SPDY Stream that this sits on top of.
129 scoped_refptr<SpdyStream> spdy_stream_; 130 scoped_refptr<SpdyStream> spdy_stream_;
130 131
131 // Stores the callback to the layer above, called on completing Read() or 132 // Stores the callback to the layer above, called on completing Read() or
132 // Connect(). 133 // Connect().
133 OldCompletionCallback* read_callback_; 134 OldCompletionCallback* old_read_callback_;
135 CompletionCallback read_callback_;
134 // Stores the callback to the layer above, called on completing Write(). 136 // Stores the callback to the layer above, called on completing Write().
135 OldCompletionCallback* write_callback_; 137 OldCompletionCallback* write_callback_;
136 138
137 // CONNECT request and response. 139 // CONNECT request and response.
138 HttpRequestInfo request_; 140 HttpRequestInfo request_;
139 HttpResponseInfo response_; 141 HttpResponseInfo response_;
140 142
141 // The hostname and port of the endpoint. This is not necessarily the one 143 // The hostname and port of the endpoint. This is not necessarily the one
142 // specified by the URL, due to Alternate-Protocol or fixed testing ports. 144 // specified by the URL, due to Alternate-Protocol or fixed testing ports.
143 const HostPortPair endpoint_; 145 const HostPortPair endpoint_;
(...skipping 18 matching lines...) Expand all
162 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; 164 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_;
163 165
164 const BoundNetLog net_log_; 166 const BoundNetLog net_log_;
165 167
166 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); 168 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket);
167 }; 169 };
168 170
169 } // namespace net 171 } // namespace net
170 172
171 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ 173 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698