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

Unified Diff: net/spdy/buffered_spdy_framer_unittest.cc

Issue 2096713002: Reduce SpdyHeaderBlock copies with move semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clear() does not work after all. Created 4 years, 6 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/spdy_network_transaction_unittest.cc » ('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 adb09c149a3ae45a232a04ff116a7a3fb5746821..f70a6bcc50a6b5b07a5e228af66f66dbac8e4ffe 100644
--- a/net/spdy/buffered_spdy_framer_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_unittest.cc
@@ -4,6 +4,8 @@
#include "net/spdy/buffered_spdy_framer.h"
+#include <utility>
+
#include "base/logging.h"
#include "net/spdy/spdy_test_util_common.h"
#include "testing/platform_test.h"
@@ -242,7 +244,7 @@ TEST_P(BufferedSpdyFramerTest, ReadSynStreamHeaderBlock) {
framer.CreateSynStream(1, // stream_id
0, // associated_stream_id
1, // priority
- CONTROL_FLAG_NONE, &headers));
+ CONTROL_FLAG_NONE, headers));
EXPECT_TRUE(control_frame.get() != NULL);
TestBufferedSpdyVisitor visitor(spdy_version());
@@ -266,7 +268,7 @@ TEST_P(BufferedSpdyFramerTest, HeaderListTooLarge) {
framer.CreateHeaders(1, // stream_id
CONTROL_FLAG_NONE,
255, // weight
- &headers));
+ std::move(headers)));
EXPECT_TRUE(control_frame);
TestBufferedSpdyVisitor visitor(spdy_version());
@@ -293,7 +295,7 @@ TEST_P(BufferedSpdyFramerTest, ReadSynReplyHeaderBlock) {
BufferedSpdyFramer framer(spdy_version());
std::unique_ptr<SpdySerializedFrame> control_frame(
framer.CreateSynReply(1, // stream_id
- CONTROL_FLAG_NONE, &headers));
+ CONTROL_FLAG_NONE, headers));
EXPECT_TRUE(control_frame.get() != NULL);
TestBufferedSpdyVisitor visitor(spdy_version());
@@ -322,7 +324,7 @@ TEST_P(BufferedSpdyFramerTest, ReadHeadersHeaderBlock) {
framer.CreateHeaders(1, // stream_id
CONTROL_FLAG_NONE,
255, // weight
- &headers));
+ headers));
EXPECT_TRUE(control_frame.get() != NULL);
TestBufferedSpdyVisitor visitor(spdy_version());
@@ -345,7 +347,7 @@ TEST_P(BufferedSpdyFramerTest, ReadPushPromiseHeaderBlock) {
headers["gamma"] = "delta";
BufferedSpdyFramer framer(spdy_version());
std::unique_ptr<SpdySerializedFrame> control_frame(
- framer.CreatePushPromise(1, 2, &headers));
+ framer.CreatePushPromise(1, 2, headers));
EXPECT_TRUE(control_frame.get() != NULL);
TestBufferedSpdyVisitor visitor(spdy_version());
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698