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

Unified Diff: net/spdy/buffered_spdy_framer_unittest.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/buffered_spdy_framer.cc ('k') | net/spdy/header_coalescer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/buffered_spdy_framer_unittest.cc
diff --git a/net/spdy/buffered_spdy_framer_unittest.cc b/net/spdy/buffered_spdy_framer_unittest.cc
index 327905917feb9227f73593b65b8ac92241015f76..0a851fe83c410cf2e2a89c82def9cc1878111a75 100644
--- a/net/spdy/buffered_spdy_framer_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_unittest.cc
@@ -45,11 +45,11 @@ class TestBufferedSpdyVisitor : public BufferedSpdyFramerVisitorInterface {
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
- const SpdyHeaderBlock& headers) override {
+ SpdyHeaderBlock headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
headers_frame_count_++;
- headers_ = headers.Clone();
+ headers_ = std::move(headers);
}
void OnDataFrameHeader(SpdyStreamId stream_id,
@@ -103,13 +103,13 @@ class TestBufferedSpdyVisitor : public BufferedSpdyFramerVisitorInterface {
void OnPushPromise(SpdyStreamId stream_id,
SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override {
+ SpdyHeaderBlock headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
push_promise_frame_count_++;
promised_stream_id_ = promised_stream_id;
EXPECT_NE(promised_stream_id_, SpdyFramer::kInvalidStream);
- headers_ = headers.Clone();
+ headers_ = std::move(headers);
}
void OnAltSvc(SpdyStreamId stream_id,
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/header_coalescer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698