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

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

Issue 2526003002: Disallow multiple HEADERS frames on pushed streams. (Closed)
Patch Set: Rename enum, enum entry, and member. Created 4 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
« no previous file with comments | « net/spdy/bidirectional_stream_spdy_impl.cc ('k') | net/spdy/spdy_http_stream.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_HTTP_STREAM_H_ 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_
6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; 80 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
81 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; 81 bool GetRemoteEndpoint(IPEndPoint* endpoint) override;
82 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, 82 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
83 TokenBindingType tb_type, 83 TokenBindingType tb_type,
84 std::vector<uint8_t>* out) override; 84 std::vector<uint8_t>* out) override;
85 void Drain(HttpNetworkSession* session) override; 85 void Drain(HttpNetworkSession* session) override;
86 void PopulateNetErrorDetails(NetErrorDetails* details) override; 86 void PopulateNetErrorDetails(NetErrorDetails* details) override;
87 void SetPriority(RequestPriority priority) override; 87 void SetPriority(RequestPriority priority) override;
88 88
89 // SpdyStream::Delegate implementation. 89 // SpdyStream::Delegate implementation.
90 void OnRequestHeadersSent() override; 90 void OnHeadersSent() override;
91 SpdyResponseHeadersStatus OnResponseHeadersUpdated( 91 void OnHeadersReceived(const SpdyHeaderBlock& response_headers) override;
92 const SpdyHeaderBlock& response_headers) override;
93 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override; 92 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override;
94 void OnDataSent() override; 93 void OnDataSent() override;
95 void OnTrailers(const SpdyHeaderBlock& trailers) override; 94 void OnTrailers(const SpdyHeaderBlock& trailers) override;
96 void OnClose(int status) override; 95 void OnClose(int status) override;
97 96
98 private: 97 private:
99 // Helper function used to initialize private members and to set delegate on 98 // Helper function used to initialize private members and to set delegate on
100 // stream when stream is created. 99 // stream when stream is created.
101 void InitializeStreamHelper(); 100 void InitializeStreamHelper();
102 101
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // owner. 160 // owner.
162 const HttpRequestInfo* request_info_; 161 const HttpRequestInfo* request_info_;
163 162
164 // |response_info_| is the HTTP response data object which is filled in 163 // |response_info_| is the HTTP response data object which is filled in
165 // when a response HEADERS comes in for the stream. 164 // when a response HEADERS comes in for the stream.
166 // It is not owned by this stream object, or point to |push_response_info_|. 165 // It is not owned by this stream object, or point to |push_response_info_|.
167 HttpResponseInfo* response_info_; 166 HttpResponseInfo* response_info_;
168 167
169 std::unique_ptr<HttpResponseInfo> push_response_info_; 168 std::unique_ptr<HttpResponseInfo> push_response_info_;
170 169
171 // We don't use SpdyStream's |response_header_status_| as we 170 bool response_headers_complete_;
172 // sometimes call back into our delegate before it is updated.
173 SpdyResponseHeadersStatus response_headers_status_;
174 171
175 // We buffer the response body as it arrives asynchronously from the stream. 172 // We buffer the response body as it arrives asynchronously from the stream.
176 SpdyReadQueue response_body_queue_; 173 SpdyReadQueue response_body_queue_;
177 174
178 CompletionCallback request_callback_; 175 CompletionCallback request_callback_;
179 CompletionCallback response_callback_; 176 CompletionCallback response_callback_;
180 177
181 // User provided buffer for the ReadResponseBody() response. 178 // User provided buffer for the ReadResponseBody() response.
182 scoped_refptr<IOBuffer> user_buffer_; 179 scoped_refptr<IOBuffer> user_buffer_;
183 int user_buffer_len_; 180 int user_buffer_len_;
(...skipping 15 matching lines...) Expand all
199 bool was_alpn_negotiated_; 196 bool was_alpn_negotiated_;
200 197
201 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; 198 base::WeakPtrFactory<SpdyHttpStream> weak_factory_;
202 199
203 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); 200 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream);
204 }; 201 };
205 202
206 } // namespace net 203 } // namespace net
207 204
208 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ 205 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_
OLDNEW
« no previous file with comments | « net/spdy/bidirectional_stream_spdy_impl.cc ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698