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

Side by Side Diff: net/http/http_proxy_client_socket.h

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/http/http_network_transaction_unittest.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return using_spdy_; 54 return using_spdy_;
55 } 55 }
56 56
57 // ProxyClientSocket implementation. 57 // ProxyClientSocket implementation.
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 implementation. 63 // StreamSocket implementation.
64 virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
65 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 64 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
66 virtual void Disconnect() OVERRIDE; 65 virtual void Disconnect() OVERRIDE;
67 virtual bool IsConnected() const OVERRIDE; 66 virtual bool IsConnected() const OVERRIDE;
68 virtual bool IsConnectedAndIdle() const OVERRIDE; 67 virtual bool IsConnectedAndIdle() const OVERRIDE;
69 virtual const BoundNetLog& NetLog() const OVERRIDE; 68 virtual const BoundNetLog& NetLog() const OVERRIDE;
70 virtual void SetSubresourceSpeculation() OVERRIDE; 69 virtual void SetSubresourceSpeculation() OVERRIDE;
71 virtual void SetOmniboxSpeculation() OVERRIDE; 70 virtual void SetOmniboxSpeculation() OVERRIDE;
72 virtual bool WasEverUsed() const OVERRIDE; 71 virtual bool WasEverUsed() const OVERRIDE;
73 virtual bool UsingTCPFastOpen() const OVERRIDE; 72 virtual bool UsingTCPFastOpen() const OVERRIDE;
74 virtual int64 NumBytesRead() const OVERRIDE; 73 virtual int64 NumBytesRead() const OVERRIDE;
75 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 74 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
76 75
77 // Socket implementation. 76 // Socket implementation.
78 virtual int Read(IOBuffer* buf, 77 virtual int Read(IOBuffer* buf,
79 int buf_len, 78 int buf_len,
80 OldCompletionCallback* callback) OVERRIDE;
81 virtual int Read(IOBuffer* buf,
82 int buf_len,
83 const CompletionCallback& callback) OVERRIDE; 79 const CompletionCallback& callback) OVERRIDE;
84 virtual int Write(IOBuffer* buf, 80 virtual int Write(IOBuffer* buf,
85 int buf_len, 81 int buf_len,
86 OldCompletionCallback* callback) OVERRIDE; 82 const CompletionCallback& callback) OVERRIDE;
87 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 83 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
88 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 84 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
89 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; 85 virtual int GetPeerAddress(AddressList* address) const OVERRIDE;
90 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; 86 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE;
91 87
92 private: 88 private:
93 enum State { 89 enum State {
94 STATE_NONE, 90 STATE_NONE,
95 STATE_GENERATE_AUTH_TOKEN, 91 STATE_GENERATE_AUTH_TOKEN,
96 STATE_GENERATE_AUTH_TOKEN_COMPLETE, 92 STATE_GENERATE_AUTH_TOKEN_COMPLETE,
(...skipping 26 matching lines...) Expand all
123 int DoSendRequestComplete(int result); 119 int DoSendRequestComplete(int result);
124 int DoReadHeaders(); 120 int DoReadHeaders();
125 int DoReadHeadersComplete(int result); 121 int DoReadHeadersComplete(int result);
126 int DoDrainBody(); 122 int DoDrainBody();
127 int DoDrainBodyComplete(int result); 123 int DoDrainBodyComplete(int result);
128 124
129 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_; 125 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_;
130 State next_state_; 126 State next_state_;
131 127
132 // Stores the callback to the layer above, called on completing Connect(). 128 // Stores the callback to the layer above, called on completing Connect().
133 OldCompletionCallback* old_user_callback_;
134 CompletionCallback user_callback_; 129 CompletionCallback user_callback_;
135 130
136 HttpRequestInfo request_; 131 HttpRequestInfo request_;
137 HttpResponseInfo response_; 132 HttpResponseInfo response_;
138 133
139 scoped_refptr<GrowableIOBuffer> parser_buf_; 134 scoped_refptr<GrowableIOBuffer> parser_buf_;
140 scoped_ptr<HttpStreamParser> http_stream_parser_; 135 scoped_ptr<HttpStreamParser> http_stream_parser_;
141 scoped_refptr<IOBuffer> drain_buf_; 136 scoped_refptr<IOBuffer> drain_buf_;
142 137
143 // Stores the underlying socket. 138 // Stores the underlying socket.
(...skipping 13 matching lines...) Expand all
157 HttpRequestHeaders request_headers_; 152 HttpRequestHeaders request_headers_;
158 153
159 const BoundNetLog net_log_; 154 const BoundNetLog net_log_;
160 155
161 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); 156 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket);
162 }; 157 };
163 158
164 } // namespace net 159 } // namespace net
165 160
166 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ 161 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698