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

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

Issue 8591037: Implement Drain() on HttpPipelinedStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tests Created 9 years, 1 month 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_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 10 matching lines...) Expand all
21 #include "net/base/upload_data_stream.h" 21 #include "net/base/upload_data_stream.h"
22 #include "net/http/http_pipelined_connection.h" 22 #include "net/http/http_pipelined_connection.h"
23 #include "net/http/http_request_info.h" 23 #include "net/http/http_request_info.h"
24 #include "net/http/http_stream_parser.h" 24 #include "net/http/http_stream_parser.h"
25 #include "net/proxy/proxy_info.h" 25 #include "net/proxy/proxy_info.h"
26 26
27 namespace net { 27 namespace net {
28 28
29 class ClientSocketHandle; 29 class ClientSocketHandle;
30 class GrowableIOBuffer; 30 class GrowableIOBuffer;
31 class HttpNetworkSession;
31 class HttpRequestHeaders; 32 class HttpRequestHeaders;
32 class HttpResponseInfo; 33 class HttpResponseInfo;
33 class IOBuffer; 34 class IOBuffer;
34 class SSLCertRequestInfo; 35 class SSLCertRequestInfo;
35 class SSLInfo; 36 class SSLInfo;
36 37
37 // This class manages all of the state for a single pipelined connection. It 38 // This class manages all of the state for a single pipelined connection. It
38 // tracks the order that HTTP requests are sent and enforces that the 39 // tracks the order that HTTP requests are sent and enforces that the
39 // subsequent reads occur in the appropriate order. 40 // subsequent reads occur in the appropriate order.
40 // 41 //
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool IsConnectionReused(int pipeline_id) const; 111 bool IsConnectionReused(int pipeline_id) const;
111 112
112 void SetConnectionReused(int pipeline_id); 113 void SetConnectionReused(int pipeline_id);
113 114
114 void GetSSLInfo(int pipeline_id, 115 void GetSSLInfo(int pipeline_id,
115 SSLInfo* ssl_info); 116 SSLInfo* ssl_info);
116 117
117 void GetSSLCertRequestInfo(int pipeline_id, 118 void GetSSLCertRequestInfo(int pipeline_id,
118 SSLCertRequestInfo* cert_request_info); 119 SSLCertRequestInfo* cert_request_info);
119 120
121 // Attempts to drain the response body for |stream| so that the pipeline may
122 // be reused.
123 void Drain(HttpPipelinedStream* stream, HttpNetworkSession* session);
124
120 private: 125 private:
121 enum StreamState { 126 enum StreamState {
122 STREAM_CREATED, 127 STREAM_CREATED,
123 STREAM_BOUND, 128 STREAM_BOUND,
124 STREAM_SENDING, 129 STREAM_SENDING,
125 STREAM_SENT, 130 STREAM_SENT,
126 STREAM_READ_PENDING, 131 STREAM_READ_PENDING,
127 STREAM_ACTIVE, 132 STREAM_ACTIVE,
128 STREAM_CLOSED, 133 STREAM_CLOSED,
129 STREAM_READ_EVICTED, 134 STREAM_READ_EVICTED,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 int active_read_id_; 297 int active_read_id_;
293 bool read_still_on_call_stack_; 298 bool read_still_on_call_stack_;
294 OldCompletionCallbackImpl<HttpPipelinedConnectionImpl> read_io_callback_; 299 OldCompletionCallbackImpl<HttpPipelinedConnectionImpl> read_io_callback_;
295 300
296 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionImpl); 301 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionImpl);
297 }; 302 };
298 303
299 } // namespace net 304 } // namespace net
300 305
301 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ 306 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_pipelined_connection_impl.cc » ('j') | net/http/http_pipelined_connection_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698