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

Unified Diff: net/quic/core/quic_session.cc

Issue 2588043002: Pass value and use std::move instead of const reference for ack listeners. (Closed)
Patch Set: Created 4 years 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/quic/core/quic_session.h ('k') | net/quic/core/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_session.cc
diff --git a/net/quic/core/quic_session.cc b/net/quic/core/quic_session.cc
index b4a69dd7606748fb03de3245e3681690f81780d9..94be95128dfeb13d7b982e08533d644102420543 100644
--- a/net/quic/core/quic_session.cc
+++ b/net/quic/core/quic_session.cc
@@ -283,7 +283,7 @@ QuicConsumedData QuicSession::WritevData(
QuicIOVector iov,
QuicStreamOffset offset,
bool fin,
- const scoped_refptr<QuicAckListenerInterface>& ack_notifier_delegate) {
+ scoped_refptr<QuicAckListenerInterface> ack_notifier_delegate) {
// This check is an attempt to deal with potential memory corruption
// in which |id| ends up set to 1 (the crypto stream id). If this happen
// it might end up resulting in unencrypted stream data being sent.
@@ -302,8 +302,8 @@ QuicConsumedData QuicSession::WritevData(
// up write blocked until OnCanWrite is next called.
return QuicConsumedData(0, false);
}
- QuicConsumedData data =
- connection_->SendStreamData(id, iov, offset, fin, ack_notifier_delegate);
+ QuicConsumedData data = connection_->SendStreamData(
+ id, iov, offset, fin, std::move(ack_notifier_delegate));
write_blocked_streams_.UpdateBytesForStream(id, data.bytes_consumed);
return data;
}
« no previous file with comments | « net/quic/core/quic_session.h ('k') | net/quic/core/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698