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

Side by Side Diff: net/http/http_stream_parser.h

Issue 1316863007: Change GetTotalReceivedBytes() from int64 to int64_t. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 5 years, 3 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/http/http_stream_factory_impl_unittest.cc ('k') | net/http/http_transaction.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 #ifndef NET_HTTP_HTTP_STREAM_PARSER_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_PARSER_H_
6 #define NET_HTTP_HTTP_STREAM_PARSER_H_ 6 #define NET_HTTP_HTTP_STREAM_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Returns true if the underlying connection can be reused. 78 // Returns true if the underlying connection can be reused.
79 // The connection can be reused if: 79 // The connection can be reused if:
80 // * It's still connected. 80 // * It's still connected.
81 // * The response headers indicate the connection can be kept alive. 81 // * The response headers indicate the connection can be kept alive.
82 // * The end of the response can be found. 82 // * The end of the response can be found.
83 // 83 //
84 // Note that if response headers have yet to be received, this will return 84 // Note that if response headers have yet to be received, this will return
85 // false. 85 // false.
86 bool CanReuseConnection() const; 86 bool CanReuseConnection() const;
87 87
88 int64 received_bytes() const { return received_bytes_; } 88 int64_t received_bytes() const { return received_bytes_; }
89 89
90 int64_t sent_bytes() const { return sent_bytes_; } 90 int64_t sent_bytes() const { return sent_bytes_; }
91 91
92 void GetSSLInfo(SSLInfo* ssl_info); 92 void GetSSLInfo(SSLInfo* ssl_info);
93 93
94 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); 94 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info);
95 95
96 // Encodes the given |payload| in the chunked format to |output|. 96 // Encodes the given |payload| in the chunked format to |output|.
97 // Returns the number of bytes written to |output|. |output_size| should 97 // Returns the number of bytes written to |output|. |output_size| should
98 // be large enough to store the encoded chunk, which is payload.size() + 98 // be large enough to store the encoded chunk, which is payload.size() +
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // body data in the same packet as header data but is zero when reading 204 // body data in the same packet as header data but is zero when reading
205 // headers. 205 // headers.
206 int read_buf_unused_offset_; 206 int read_buf_unused_offset_;
207 207
208 // The amount beyond |read_buf_unused_offset_| where the status line starts; 208 // The amount beyond |read_buf_unused_offset_| where the status line starts;
209 // -1 if not found yet. 209 // -1 if not found yet.
210 int response_header_start_offset_; 210 int response_header_start_offset_;
211 211
212 // The amount of received data. If connection is reused then intermediate 212 // The amount of received data. If connection is reused then intermediate
213 // value may be bigger than final. 213 // value may be bigger than final.
214 int64 received_bytes_; 214 int64_t received_bytes_;
215 215
216 // The amount of sent data. 216 // The amount of sent data.
217 int64_t sent_bytes_; 217 int64_t sent_bytes_;
218 218
219 // The parsed response headers. Owned by the caller of SendRequest. This 219 // The parsed response headers. Owned by the caller of SendRequest. This
220 // cannot be safely accessed after reading the final set of headers, as the 220 // cannot be safely accessed after reading the final set of headers, as the
221 // caller of SendRequest may have been destroyed - this happens in the case an 221 // caller of SendRequest may have been destroyed - this happens in the case an
222 // HttpResponseBodyDrainer is used. 222 // HttpResponseBodyDrainer is used.
223 HttpResponseInfo* response_; 223 HttpResponseInfo* response_;
224 224
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 int upload_error_; 266 int upload_error_;
267 267
268 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; 268 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_;
269 269
270 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); 270 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser);
271 }; 271 };
272 272
273 } // namespace net 273 } // namespace net
274 274
275 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ 275 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/http/http_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698