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

Unified Diff: net/spdy/spdy_http_stream.h

Issue 2298823002: Resetting the HttpRequestInfo pointers in HttpNetworkTransaction and streams (Closed)
Patch Set: Rebased, removed upload progress plumbing, feedback. (Rebased till refs/heads/master@{#417381}) 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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_http_stream.h
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index 0af46b498675889736c7e3eee80c4be2ed494097..a44ebbb1268667c6c29a32a47fd01c2ef8d16016 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -52,7 +52,6 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
int SendRequest(const HttpRequestHeaders& headers,
HttpResponseInfo* response,
const CompletionCallback& callback) override;
- UploadProgress GetUploadProgress() const override;
int ReadResponseHeaders(const CompletionCallback& callback) override;
int ReadResponseBody(IOBuffer* buf,
int buf_len,
@@ -136,6 +135,8 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
void DoBufferedReadCallback();
bool ShouldWaitForMoreBufferedData() const;
+ void ResetRequestInfo();
+
const base::WeakPtr<SpdySession> spdy_session_;
bool is_reused_;
SpdyStreamRequest stream_request_;
@@ -156,6 +157,9 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
int64_t closed_stream_sent_bytes_;
// The request to send.
+ // Set to null when response body is starting to be read. This is to allow
+ // the stream to be shared for reading and to possibly outlive request_info_'s
+ // owner.
const HttpRequestInfo* request_info_;
// |response_info_| is the HTTP response data object which is filled in

Powered by Google App Engine
This is Rietveld 408576698