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

Side by Side Diff: net/tools/quic/quic_spdy_client_stream.h

Issue 1776423004: Only MarkTrailersConsumed when actually sending trailers notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add internal changes and fix tests Created 4 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/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('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 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_
6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void SendBody(const std::string& data, 57 void SendBody(const std::string& data,
58 bool fin, 58 bool fin,
59 QuicAckListenerInterface* listener); 59 QuicAckListenerInterface* listener);
60 60
61 // Returns the response data. 61 // Returns the response data.
62 const std::string& data() { return data_; } 62 const std::string& data() { return data_; }
63 63
64 // Returns whatever headers have been received for this stream. 64 // Returns whatever headers have been received for this stream.
65 const SpdyHeaderBlock& headers() { return response_headers_; } 65 const SpdyHeaderBlock& headers() { return response_headers_; }
66 66
67 // Returns whatever trailers have been received for this stream.
68 const SpdyHeaderBlock& trailers() { return response_trailers_; }
69
70 size_t header_bytes_read() const { return header_bytes_read_; } 67 size_t header_bytes_read() const { return header_bytes_read_; }
71 68
72 size_t header_bytes_written() const { return header_bytes_written_; } 69 size_t header_bytes_written() const { return header_bytes_written_; }
73 70
74 size_t trailer_bytes_read() const { return header_bytes_read_; } 71 size_t trailer_bytes_read() const { return header_bytes_read_; }
75 72
76 int response_code() const { return response_code_; } 73 int response_code() const { return response_code_; }
77 74
78 // While the server's SetPriority shouldn't be called externally, the creator 75 // While the server's SetPriority shouldn't be called externally, the creator
79 // of client-side streams should be able to set the priority. 76 // of client-side streams should be able to set the priority.
80 using QuicSpdyStream::SetPriority; 77 using QuicSpdyStream::SetPriority;
81 78
82 void set_allow_bidirectional_data(bool value) { 79 void set_allow_bidirectional_data(bool value) {
83 allow_bidirectional_data_ = value; 80 allow_bidirectional_data_ = value;
84 } 81 }
85 82
86 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } 83 bool allow_bidirectional_data() const { return allow_bidirectional_data_; }
87 84
88 private: 85 private:
89 // The parsed headers received from the server. 86 // The parsed headers received from the server.
90 SpdyHeaderBlock response_headers_; 87 SpdyHeaderBlock response_headers_;
91 88
92 // The parsed trailers received from the server.
93 SpdyHeaderBlock response_trailers_;
94
95 // The parsed content-length, or -1 if none is specified. 89 // The parsed content-length, or -1 if none is specified.
96 int content_length_; 90 int content_length_;
97 int response_code_; 91 int response_code_;
98 std::string data_; 92 std::string data_;
99 size_t header_bytes_read_; 93 size_t header_bytes_read_;
100 size_t header_bytes_written_; 94 size_t header_bytes_written_;
101 // When true allows the sending of a request to continue while the response is 95 // When true allows the sending of a request to continue while the response is
102 // arriving. 96 // arriving.
103 bool allow_bidirectional_data_; 97 bool allow_bidirectional_data_;
104 98
105 QuicClientSession* session_; 99 QuicClientSession* session_;
106 100
107 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); 101 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream);
108 }; 102 };
109 103
110 } // namespace net 104 } // namespace net
111 105
112 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ 106 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698