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

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

Issue 2589983002: Create a QUIC wrapper around scoped_refptr. (Closed)
Patch Set: rm = nullptr 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_stream.h ('k') | net/quic/core/quic_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream.cc
diff --git a/net/quic/core/quic_stream.cc b/net/quic/core/quic_stream.cc
index 403a1b1ce88df1f55d097347e8a7e926d678be61..8a3d4a1364fba2ff258e3b76a022b4b51d807abe 100644
--- a/net/quic/core/quic_stream.cc
+++ b/net/quic/core/quic_stream.cc
@@ -43,7 +43,7 @@ size_t GetReceivedFlowControlWindow(QuicSession* session) {
QuicStream::PendingData::PendingData(
string data_in,
- scoped_refptr<QuicAckListenerInterface> ack_listener_in)
+ QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener_in)
: data(std::move(data_in)),
offset(0),
ack_listener(std::move(ack_listener_in)) {}
@@ -182,7 +182,7 @@ void QuicStream::CloseConnectionWithDetails(QuicErrorCode error,
void QuicStream::WriteOrBufferData(
StringPiece data,
bool fin,
- scoped_refptr<QuicAckListenerInterface> ack_listener) {
+ QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
if (data.empty() && !fin) {
QUIC_BUG << "data.empty() && !fin";
return;
@@ -219,7 +219,7 @@ void QuicStream::OnCanWrite() {
bool fin = false;
while (!queued_data_.empty()) {
PendingData* pending_data = &queued_data_.front();
- scoped_refptr<QuicAckListenerInterface> ack_listener =
+ QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener =
pending_data->ack_listener;
if (queued_data_.size() == 1 && fin_buffered_) {
fin = true;
@@ -270,7 +270,7 @@ QuicConsumedData QuicStream::WritevData(
const struct iovec* iov,
int iov_count,
bool fin,
- scoped_refptr<QuicAckListenerInterface> ack_listener) {
+ QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
if (write_side_closed_) {
DLOG(ERROR) << ENDPOINT << "Attempt to write when the write side is closed";
return QuicConsumedData(0, false);
@@ -351,7 +351,8 @@ QuicConsumedData QuicStream::WritevDataInner(
QuicIOVector iov,
QuicStreamOffset offset,
bool fin,
- scoped_refptr<QuicAckListenerInterface> ack_notifier_delegate) {
+ QuicReferenceCountedPointer<QuicAckListenerInterface>
+ ack_notifier_delegate) {
return session()->WritevData(this, id(), iov, offset, fin,
std::move(ack_notifier_delegate));
}
« no previous file with comments | « net/quic/core/quic_stream.h ('k') | net/quic/core/quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698