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

Unified Diff: net/spdy/spdy_stream.h

Issue 2169583002: Eliminate SpdyHeaderBlock copy in SpdyStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.h
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 4602fe7454587682c5bfa60e6105258c3b1c6a26..d96e5e910895eabff0d7a0d86706e002a034a7f0 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -429,17 +429,7 @@ class NET_EXPORT_PRIVATE SpdyStream {
// Get the URL from the appropriate stream headers, or the empty
// GURL() if it is unknown.
- //
- // TODO(akalin): Figure out if we really need this function,
- // i.e. can we just use the URL this stream was created with and/or
- // one we receive headers validate that the URL from them is the
- // same.
- GURL GetUrlFromHeaders() const;
-
- // Returns whether the URL for this stream is known.
- //
- // TODO(akalin): Remove this, as it's only used in tests.
- bool HasUrlFromHeaders() const;
+ const GURL& GetUrlFromHeaders() const { return url_from_header_block_; }
private:
class SynStreamBufferProducer;
@@ -522,12 +512,12 @@ class NET_EXPORT_PRIVATE SpdyStream {
SpdyStream::Delegate* delegate_;
// The headers for the request to send.
- //
- // TODO(akalin): Hang onto this only until we send it. This
- // necessitates stashing the URL separately.
bool request_headers_valid_;
SpdyHeaderBlock request_headers_;
+ // The URL from the request headers.
+ GURL url_from_header_block_;
+
// Data waiting to be sent, and the close state of the local endpoint
// after the data is fully written.
scoped_refptr<DrainableIOBuffer> pending_send_data_;
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698