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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 2096713002: Reduce SpdyHeaderBlock copies with move semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: net/http/http_network_transaction_unittest.cc
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index e3fd3511e4cd539a405fea1d69164c9bdaaecb9d..73feff4b25abf1ee188eaaecbc9ea4757aaeb46a 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -5248,10 +5248,10 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyLoadTimingTwoHttpRequests) {
request2.load_flags = 0;
// http://www.example.org/
- std::unique_ptr<SpdyHeaderBlock> headers(
+ SpdyHeaderBlock headers(
spdy_util_.ConstructGetHeaderBlockForProxy("http://www.example.org/"));
std::unique_ptr<SpdySerializedFrame> get1(
- spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
+ spdy_util_.ConstructSpdySyn(1, std::move(headers), LOWEST, true));
std::unique_ptr<SpdySerializedFrame> get_resp1(
spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
std::unique_ptr<SpdySerializedFrame> body1(
@@ -5259,10 +5259,10 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyLoadTimingTwoHttpRequests) {
spdy_util_.UpdateWithStreamDestruction(1);
// http://mail.example.org/
- std::unique_ptr<SpdyHeaderBlock> headers2(
+ SpdyHeaderBlock headers2(
spdy_util_.ConstructGetHeaderBlockForProxy("http://mail.example.org/"));
std::unique_ptr<SpdySerializedFrame> get2(
- spdy_util_.ConstructSpdySyn(3, *headers2, LOWEST, true));
+ spdy_util_.ConstructSpdySyn(3, std::move(headers2), LOWEST, true));
std::unique_ptr<SpdySerializedFrame> get_resp2(
spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
std::unique_ptr<SpdySerializedFrame> body2(
@@ -14029,10 +14029,10 @@ TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionIfCertDoesNotMatch) {
SpdyTestUtil spdy_util_secure(GetProtocol(), GetDependenciesFromPriority());
// SPDY GET for HTTP URL (through SPDY proxy)
- std::unique_ptr<SpdyHeaderBlock> headers(
+ SpdyHeaderBlock headers(
spdy_util_.ConstructGetHeaderBlockForProxy("http://www.example.org/"));
std::unique_ptr<SpdySerializedFrame> req1(
- spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, true));
+ spdy_util_.ConstructSpdySyn(1, std::move(headers), LOWEST, true));
MockWrite writes1[] = {
CreateMockWrite(*req1, 0),

Powered by Google App Engine
This is Rietveld 408576698