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

Side by Side Diff: net/quic/test_tools/quic_stream_peer.cc

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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/test_tools/quic_stream_peer.h ('k') | net/quic/test_tools/quic_test_utils.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/test_tools/quic_stream_peer.h" 5 #include "net/quic/test_tools/quic_stream_peer.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "net/quic/core/quic_stream.h" 9 #include "net/quic/core/quic_stream.h"
10 10
11 using base::StringPiece;
12
13 namespace net { 11 namespace net {
14 namespace test { 12 namespace test {
15 13
16 // static 14 // static
17 void QuicStreamPeer::SetWriteSideClosed(bool value, QuicStream* stream) { 15 void QuicStreamPeer::SetWriteSideClosed(bool value, QuicStream* stream) {
18 stream->write_side_closed_ = value; 16 stream->write_side_closed_ = value;
19 } 17 }
20 18
21 // static 19 // static
22 void QuicStreamPeer::SetStreamBytesWritten( 20 void QuicStreamPeer::SetStreamBytesWritten(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 57
60 // static 58 // static
61 bool QuicStreamPeer::StreamContributesToConnectionFlowControl( 59 bool QuicStreamPeer::StreamContributesToConnectionFlowControl(
62 QuicStream* stream) { 60 QuicStream* stream) {
63 return stream->stream_contributes_to_connection_flow_control_; 61 return stream->stream_contributes_to_connection_flow_control_;
64 } 62 }
65 63
66 // static 64 // static
67 void QuicStreamPeer::WriteOrBufferData( 65 void QuicStreamPeer::WriteOrBufferData(
68 QuicStream* stream, 66 QuicStream* stream,
69 StringPiece data, 67 QuicStringPiece data,
70 bool fin, 68 bool fin,
71 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) { 69 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
72 stream->WriteOrBufferData(data, fin, std::move(ack_listener)); 70 stream->WriteOrBufferData(data, fin, std::move(ack_listener));
73 } 71 }
74 72
75 // static 73 // static
76 QuicStreamSequencer* QuicStreamPeer::sequencer(QuicStream* stream) { 74 QuicStreamSequencer* QuicStreamPeer::sequencer(QuicStream* stream) {
77 return &(stream->sequencer_); 75 return &(stream->sequencer_);
78 } 76 }
79 77
80 // static 78 // static
81 QuicSession* QuicStreamPeer::session(QuicStream* stream) { 79 QuicSession* QuicStreamPeer::session(QuicStream* stream) {
82 return stream->session(); 80 return stream->session();
83 } 81 }
84 82
85 } // namespace test 83 } // namespace test
86 } // namespace net 84 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_stream_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698