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

Side by Side Diff: net/quic/quic_http_stream.h

Issue 1360063002: Include HTTP header bytes in GetTotalSent/ReceivedBytes for QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 5 years, 2 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 | « no previous file | net/quic/quic_http_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_QUIC_QUIC_HTTP_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_HTTP_STREAM_H_
6 #define NET_QUIC_QUIC_HTTP_STREAM_H_ 6 #define NET_QUIC_QUIC_HTTP_STREAM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 bool CanReuseConnection() const override; 55 bool CanReuseConnection() const override;
56 int64_t GetTotalReceivedBytes() const override; 56 int64_t GetTotalReceivedBytes() const override;
57 int64_t GetTotalSentBytes() const override; 57 int64_t GetTotalSentBytes() const override;
58 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 58 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
59 void GetSSLInfo(SSLInfo* ssl_info) override; 59 void GetSSLInfo(SSLInfo* ssl_info) override;
60 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; 60 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
61 void Drain(HttpNetworkSession* session) override; 61 void Drain(HttpNetworkSession* session) override;
62 void SetPriority(RequestPriority priority) override; 62 void SetPriority(RequestPriority priority) override;
63 63
64 // QuicReliableClientStream::Delegate implementation 64 // QuicReliableClientStream::Delegate implementation
65 void OnHeadersAvailable(const SpdyHeaderBlock& headers) override; 65 void OnHeadersAvailable(const SpdyHeaderBlock& headers,
66 size_t frame_len) override;
66 void OnDataAvailable() override; 67 void OnDataAvailable() override;
67 void OnClose(QuicErrorCode error) override; 68 void OnClose(QuicErrorCode error) override;
68 void OnError(int error) override; 69 void OnError(int error) override;
69 bool HasSendHeadersComplete() override; 70 bool HasSendHeadersComplete() override;
70 71
71 // QuicChromiumClientSession::Observer implementation 72 // QuicChromiumClientSession::Observer implementation
72 void OnCryptoHandshakeConfirmed() override; 73 void OnCryptoHandshakeConfirmed() override;
73 void OnSessionClosed(int error) override; 74 void OnSessionClosed(int error) override;
74 75
75 private: 76 private:
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 int response_status_; 138 int response_status_;
138 139
139 // Serialized request headers. 140 // Serialized request headers.
140 SpdyHeaderBlock request_headers_; 141 SpdyHeaderBlock request_headers_;
141 142
142 bool response_headers_received_; 143 bool response_headers_received_;
143 144
144 // Serialized HTTP request. 145 // Serialized HTTP request.
145 std::string request_; 146 std::string request_;
146 147
148 // Number of bytes received by the headers stream on behalf of this stream.
149 int64_t headers_bytes_received_;
150 // Number of bytes sent by the headers stream on behalf of this stream.
151 int64_t headers_bytes_sent_;
152
147 // Number of bytes received when the stream was closed. 153 // Number of bytes received when the stream was closed.
148 int64_t closed_stream_received_bytes_; 154 int64_t closed_stream_received_bytes_;
149 // Number of bytes sent when the stream was closed. 155 // Number of bytes sent when the stream was closed.
150 int64_t closed_stream_sent_bytes_; 156 int64_t closed_stream_sent_bytes_;
151 157
152 // The caller's callback to be used for asynchronous operations. 158 // The caller's callback to be used for asynchronous operations.
153 CompletionCallback callback_; 159 CompletionCallback callback_;
154 160
155 // Caller provided buffer for the ReadResponseBody() response. 161 // Caller provided buffer for the ReadResponseBody() response.
156 scoped_refptr<IOBuffer> user_buffer_; 162 scoped_refptr<IOBuffer> user_buffer_;
157 int user_buffer_len_; 163 int user_buffer_len_;
158 164
159 // Temporary buffer used to read the request body from UploadDataStream. 165 // Temporary buffer used to read the request body from UploadDataStream.
160 scoped_refptr<IOBufferWithSize> raw_request_body_buf_; 166 scoped_refptr<IOBufferWithSize> raw_request_body_buf_;
161 // Wraps raw_request_body_buf_ to read the remaining data progressively. 167 // Wraps raw_request_body_buf_ to read the remaining data progressively.
162 scoped_refptr<DrainableIOBuffer> request_body_buf_; 168 scoped_refptr<DrainableIOBuffer> request_body_buf_;
163 169
164 BoundNetLog stream_net_log_; 170 BoundNetLog stream_net_log_;
165 171
166 base::WeakPtrFactory<QuicHttpStream> weak_factory_; 172 base::WeakPtrFactory<QuicHttpStream> weak_factory_;
167 173
168 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); 174 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream);
169 }; 175 };
170 176
171 } // namespace net 177 } // namespace net
172 178
173 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ 179 #endif // NET_QUIC_QUIC_HTTP_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698