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

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: 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/http/bidirectional_stream_unittest.cc ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 532cdd5d261096f3d110bd6ee9c0668322fc5a9f..f08fcc602bd656bd6f569cc467fc6032e77f1b2e 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(
@@ -14023,10 +14023,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),
« no previous file with comments | « net/http/bidirectional_stream_unittest.cc ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698