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

Unified Diff: net/http/http_stream_parser.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/http/http_stream_parser.h
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index f5dbd0d564c012cd2f68b9976d15c91dcef7dafb..a072f27208a345003e531ee8aed9fcaaa5bc8311 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -19,7 +19,6 @@
#include "net/base/completion_callback.h"
#include "net/base/net_errors.h"
#include "net/base/net_export.h"
-#include "net/base/upload_progress.h"
#include "net/log/net_log.h"
namespace net {
@@ -72,10 +71,6 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
void Close(bool not_reusable);
- // Returns the progress of uploading. When data is chunked, size is set to
- // zero, but position will not be.
- UploadProgress GetUploadProgress() const;
-
bool IsResponseBodyComplete() const;
bool CanFindEndOfResponse() const;
@@ -204,10 +199,14 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
// Check if buffers used to send the request are empty.
bool SendRequestBuffersEmpty();
+ // Sets request_ to null.
+ void ResetRequestInfo();
+
// Next state of the request, when the current one completes.
State io_state_;
- // The request to send.
+ // Null when read state machine is invoked. This is to allow the stream
+ // to be shared for reading and to possibly outlive request_'s owner.
const HttpRequestInfo* request_;
// The request header data. May include a merged request body.

Powered by Google App Engine
This is Rietveld 408576698