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

Side by Side Diff: net/quic/core/quic_session_test.cc

Issue 2589983002: Create a QUIC wrapper around scoped_refptr. (Closed)
Patch Set: rm = nullptr Created 3 years, 12 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_session.h" 5 #include "net/quic/core/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 QuicStream* GetOrCreateDynamicStream(QuicStreamId stream_id) { 161 QuicStream* GetOrCreateDynamicStream(QuicStreamId stream_id) {
162 return QuicSpdySession::GetOrCreateDynamicStream(stream_id); 162 return QuicSpdySession::GetOrCreateDynamicStream(stream_id);
163 } 163 }
164 164
165 QuicConsumedData WritevData( 165 QuicConsumedData WritevData(
166 QuicStream* stream, 166 QuicStream* stream,
167 QuicStreamId id, 167 QuicStreamId id,
168 QuicIOVector data, 168 QuicIOVector data,
169 QuicStreamOffset offset, 169 QuicStreamOffset offset,
170 bool fin, 170 bool fin,
171 scoped_refptr<QuicAckListenerInterface> ack_notifier_delegate) override { 171 QuicReferenceCountedPointer<QuicAckListenerInterface>
172 ack_notifier_delegate) override {
172 QuicConsumedData consumed(data.total_length, fin); 173 QuicConsumedData consumed(data.total_length, fin);
173 if (!writev_consumes_all_data_) { 174 if (!writev_consumes_all_data_) {
174 consumed = QuicSession::WritevData(stream, id, data, offset, fin, 175 consumed = QuicSession::WritevData(stream, id, data, offset, fin,
175 std::move(ack_notifier_delegate)); 176 std::move(ack_notifier_delegate));
176 } 177 }
177 stream->set_stream_bytes_written(stream->stream_bytes_written() + 178 stream->set_stream_bytes_written(stream->stream_bytes_written() +
178 consumed.bytes_consumed); 179 consumed.bytes_consumed);
179 if (fin && consumed.fin_consumed) { 180 if (fin && consumed.fin_consumed) {
180 stream->set_fin_sent(true); 181 stream->set_fin_sent(true);
181 } 182 }
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 if (version() <= QUIC_VERSION_35) { 1314 if (version() <= QUIC_VERSION_35) {
1314 EXPECT_FALSE(session_.force_hol_blocking()); 1315 EXPECT_FALSE(session_.force_hol_blocking());
1315 } else { 1316 } else {
1316 EXPECT_TRUE(session_.force_hol_blocking()); 1317 EXPECT_TRUE(session_.force_hol_blocking());
1317 } 1318 }
1318 } 1319 }
1319 1320
1320 } // namespace 1321 } // namespace
1321 } // namespace test 1322 } // namespace test
1322 } // namespace net 1323 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698