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

Unified Diff: net/spdy/spdy_stream.cc

Issue 2174943002: Avoid SpdyHeaderBlock copy in SpdyStream::OnPushPromiseHeadersReceived(). (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_stream.h ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 35b84f6a2ac0a75866b95ddfdb13d97c774223e1..6b7b183dbf6118fec4722f0609064e15c176cac8 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -465,14 +465,14 @@ int SpdyStream::OnAdditionalResponseHeadersReceived(
return MergeWithResponseHeaders(additional_response_headers);
}
-void SpdyStream::OnPushPromiseHeadersReceived(const SpdyHeaderBlock& headers) {
+void SpdyStream::OnPushPromiseHeadersReceived(SpdyHeaderBlock headers) {
CHECK(!request_headers_valid_);
CHECK_EQ(io_state_, STATE_IDLE);
CHECK_EQ(type_, SPDY_PUSH_STREAM);
DCHECK(!delegate_);
io_state_ = STATE_RESERVED_REMOTE;
- request_headers_ = headers.Clone();
+ request_headers_ = std::move(headers);
request_headers_valid_ = true;
url_from_header_block_ = GetUrlFromHeaderBlock(request_headers_);
}
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698