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

Side by Side Diff: net/quic/chromium/quic_http_stream.h

Issue 2298823002: Resetting the HttpRequestInfo pointers in HttpNetworkTransaction and streams (Closed)
Patch Set: Initial patch Created 4 years, 3 months 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
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_QUIC_QUIC_HTTP_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_HTTP_STREAM_H_
6 #define NET_QUIC_QUIC_HTTP_STREAM_H_ 6 #define NET_QUIC_QUIC_HTTP_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 int ProcessResponseHeaders(const SpdyHeaderBlock& headers); 126 int ProcessResponseHeaders(const SpdyHeaderBlock& headers);
127 127
128 int ReadAvailableData(IOBuffer* buf, int buf_len); 128 int ReadAvailableData(IOBuffer* buf, int buf_len);
129 void EnterStateSendHeaders(); 129 void EnterStateSendHeaders();
130 int HandlePromise(); 130 int HandlePromise();
131 131
132 void ResetStream(); 132 void ResetStream();
133 bool CancelPromiseIfHasBody(); 133 bool CancelPromiseIfHasBody();
134 134
135 void ResetRequestInfo();
136
135 State next_state_; 137 State next_state_;
136 138
137 base::WeakPtr<QuicChromiumClientSession> session_; 139 base::WeakPtr<QuicChromiumClientSession> session_;
138 int session_error_; // Error code from the connection shutdown. 140 int session_error_; // Error code from the connection shutdown.
139 bool was_handshake_confirmed_; // True if the crypto handshake succeeded. 141 bool was_handshake_confirmed_; // True if the crypto handshake succeeded.
140 QuicChromiumClientSession::StreamRequest stream_request_; 142 QuicChromiumClientSession::StreamRequest stream_request_;
141 QuicChromiumClientStream* stream_; // Non-owning. 143 QuicChromiumClientStream* stream_; // Non-owning.
142 144
143 // The following three fields are all owned by the caller and must 145 // The following three fields are all owned by the caller and must
144 // outlive this object, according to the HttpStream contract. 146 // outlive this object, according to the HttpStream contract.
145 147
146 // The request to send. 148 // The request to send.
149 // Only valid before the response body is read.
147 const HttpRequestInfo* request_info_; 150 const HttpRequestInfo* request_info_;
151
152 // upload progress saved while resetting the request info to null.
153 UploadProgress upload_progress_;
154
148 // The request body to send, if any, owned by the caller. 155 // The request body to send, if any, owned by the caller.
149 UploadDataStream* request_body_stream_; 156 UploadDataStream* request_body_stream_;
150 // Time the request was issued. 157 // Time the request was issued.
151 base::Time request_time_; 158 base::Time request_time_;
152 // The priority of the request. 159 // The priority of the request.
153 RequestPriority priority_; 160 RequestPriority priority_;
154 // |response_info_| is the HTTP response data object which is filled in 161 // |response_info_| is the HTTP response data object which is filled in
155 // when a the response headers are read. It is not owned by this stream. 162 // when a the response headers are read. It is not owned by this stream.
156 HttpResponseInfo* response_info_; 163 HttpResponseInfo* response_info_;
157 // Because response data is buffered, also buffer the response status if the 164 // Because response data is buffered, also buffer the response status if the
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 bool in_loop_; 218 bool in_loop_;
212 219
213 base::WeakPtrFactory<QuicHttpStream> weak_factory_; 220 base::WeakPtrFactory<QuicHttpStream> weak_factory_;
214 221
215 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); 222 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream);
216 }; 223 };
217 224
218 } // namespace net 225 } // namespace net
219 226
220 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ 227 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698