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

Unified Diff: net/tools/quic/quic_spdy_client_stream.cc

Issue 2093553004: Reduce SpdyHeaderBlock copies with move semantics in shared code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove non-shared files (into a separate CL). 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/tools/quic/quic_spdy_client_stream.h ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_spdy_client_stream.cc
diff --git a/net/tools/quic/quic_spdy_client_stream.cc b/net/tools/quic/quic_spdy_client_stream.cc
index 633963ae8ece7226d5928fc30f8f4b31e46b1740..becb6a6ed37e8132755ce6966597a13201748133 100644
--- a/net/tools/quic/quic_spdy_client_stream.cc
+++ b/net/tools/quic/quic_spdy_client_stream.cc
@@ -4,6 +4,8 @@
#include "net/tools/quic/quic_spdy_client_stream.h"
+#include <utility>
+
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
@@ -180,12 +182,13 @@ void QuicSpdyClientStream::OnDataAvailable() {
}
}
-size_t QuicSpdyClientStream::SendRequest(const SpdyHeaderBlock& headers,
+size_t QuicSpdyClientStream::SendRequest(SpdyHeaderBlock headers,
StringPiece body,
bool fin) {
bool send_fin_with_headers = fin && body.empty();
size_t bytes_sent = body.size();
- header_bytes_written_ = WriteHeaders(headers, send_fin_with_headers, nullptr);
+ header_bytes_written_ =
+ WriteHeaders(std::move(headers), send_fin_with_headers, nullptr);
bytes_sent += header_bytes_written_;
if (!body.empty()) {
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.h ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698