| OLD | NEW |
| 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_PIPELINED_CONNECTION_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ |
| 6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // Cleans up the state associated with the active request. Invokes | 249 // Cleans up the state associated with the active request. Invokes |
| 250 // DoReadNextHeaders() in a new task to start the next response. This is | 250 // DoReadNextHeaders() in a new task to start the next response. This is |
| 251 // called after the active request's HttpPipelinedSocket calls Close(). | 251 // called after the active request's HttpPipelinedSocket calls Close(). |
| 252 int DoReadStreamClosed(); | 252 int DoReadStreamClosed(); |
| 253 | 253 |
| 254 // Removes all pending ReadResponseHeaders() requests from the queue. This may | 254 // Removes all pending ReadResponseHeaders() requests from the queue. This may |
| 255 // happen if there is an error with the pipeline or one of our | 255 // happen if there is an error with the pipeline or one of our |
| 256 // HttpPipelinedSockets indicates the connection was suddenly closed. | 256 // HttpPipelinedSockets indicates the connection was suddenly closed. |
| 257 int DoEvictPendingReadHeaders(int result); | 257 int DoEvictPendingReadHeaders(int result); |
| 258 | 258 |
| 259 // Reports back to |delegate_| whether pipelining will work. This is called |
| 260 // every time we receive headers. |
| 261 void CheckHeadersForPipelineCompatibility(int result, int pipeline_id); |
| 262 |
| 259 // Posts a task to fire the user's callback in response to SendRequest() or | 263 // Posts a task to fire the user's callback in response to SendRequest() or |
| 260 // ReadResponseHeaders() completing on an underlying parser. This might be | 264 // ReadResponseHeaders() completing on an underlying parser. This might be |
| 261 // invoked in response to our own IO callbacks, or it may be invoked if the | 265 // invoked in response to our own IO callbacks, or it may be invoked if the |
| 262 // underlying parser completes SendRequest() or ReadResponseHeaders() | 266 // underlying parser completes SendRequest() or ReadResponseHeaders() |
| 263 // synchronously, but we've already returned ERR_IO_PENDING to the user's | 267 // synchronously, but we've already returned ERR_IO_PENDING to the user's |
| 264 // SendRequest() or ReadResponseHeaders() call into us. | 268 // SendRequest() or ReadResponseHeaders() call into us. |
| 265 void QueueUserCallback(int pipeline_id, | 269 void QueueUserCallback(int pipeline_id, |
| 266 OldCompletionCallback* callback, | 270 OldCompletionCallback* callback, |
| 267 int rv, | 271 int rv, |
| 268 const tracked_objects::Location& from_here); | 272 const tracked_objects::Location& from_here); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 297 int active_read_id_; | 301 int active_read_id_; |
| 298 bool read_still_on_call_stack_; | 302 bool read_still_on_call_stack_; |
| 299 OldCompletionCallbackImpl<HttpPipelinedConnectionImpl> read_io_callback_; | 303 OldCompletionCallbackImpl<HttpPipelinedConnectionImpl> read_io_callback_; |
| 300 | 304 |
| 301 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionImpl); | 305 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionImpl); |
| 302 }; | 306 }; |
| 303 | 307 |
| 304 } // namespace net | 308 } // namespace net |
| 305 | 309 |
| 306 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ | 310 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ |
| OLD | NEW |