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

Side by Side Diff: net/http/http_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
« no previous file with comments | « net/curvecp/curvecp_client_socket.cc ('k') | net/http/http_proxy_client_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 bool using_spdy() { 53 bool using_spdy() {
54 return using_spdy_; 54 return using_spdy_;
55 } 55 }
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 int DoSendRequestComplete(int result); 120 int DoSendRequestComplete(int result);
120 int DoReadHeaders(); 121 int DoReadHeaders();
121 int DoReadHeadersComplete(int result); 122 int DoReadHeadersComplete(int result);
122 int DoDrainBody(); 123 int DoDrainBody();
123 int DoDrainBodyComplete(int result); 124 int DoDrainBodyComplete(int result);
124 125
125 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_; 126 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_;
126 State next_state_; 127 State next_state_;
127 128
128 // Stores the callback to the layer above, called on completing Connect(). 129 // Stores the callback to the layer above, called on completing Connect().
129 OldCompletionCallback* user_callback_; 130 OldCompletionCallback* old_user_callback_;
131 CompletionCallback user_callback_;
130 132
131 HttpRequestInfo request_; 133 HttpRequestInfo request_;
132 HttpResponseInfo response_; 134 HttpResponseInfo response_;
133 135
134 scoped_refptr<GrowableIOBuffer> parser_buf_; 136 scoped_refptr<GrowableIOBuffer> parser_buf_;
135 scoped_ptr<HttpStreamParser> http_stream_parser_; 137 scoped_ptr<HttpStreamParser> http_stream_parser_;
136 scoped_refptr<IOBuffer> drain_buf_; 138 scoped_refptr<IOBuffer> drain_buf_;
137 139
138 // Stores the underlying socket. 140 // Stores the underlying socket.
139 scoped_ptr<ClientSocketHandle> transport_; 141 scoped_ptr<ClientSocketHandle> transport_;
(...skipping 12 matching lines...) Expand all
152 HttpRequestHeaders request_headers_; 154 HttpRequestHeaders request_headers_;
153 155
154 const BoundNetLog net_log_; 156 const BoundNetLog net_log_;
155 157
156 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); 158 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket);
157 }; 159 };
158 160
159 } // namespace net 161 } // namespace net
160 162
161 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ 163 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/curvecp/curvecp_client_socket.cc ('k') | net/http/http_proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698