OLD | NEW |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool CanReuseConnection() const; | 86 bool CanReuseConnection() const; |
87 | 87 |
88 int64_t 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 int GetTokenBindingMessageHeader(std::string* out); |
| 97 |
96 // Encodes the given |payload| in the chunked format to |output|. | 98 // Encodes the given |payload| in the chunked format to |output|. |
97 // Returns the number of bytes written to |output|. |output_size| should | 99 // Returns the number of bytes written to |output|. |output_size| should |
98 // be large enough to store the encoded chunk, which is payload.size() + | 100 // be large enough to store the encoded chunk, which is payload.size() + |
99 // kChunkHeaderFooterSize. Returns ERR_INVALID_ARGUMENT if |output_size| | 101 // kChunkHeaderFooterSize. Returns ERR_INVALID_ARGUMENT if |output_size| |
100 // is not large enough. | 102 // is not large enough. |
101 // | 103 // |
102 // The output will look like: "HEX\r\n[payload]\r\n" | 104 // The output will look like: "HEX\r\n[payload]\r\n" |
103 // where HEX is a length in hexdecimal (without the "0x" prefix). | 105 // where HEX is a length in hexdecimal (without the "0x" prefix). |
104 static int EncodeChunk(const base::StringPiece& payload, | 106 static int EncodeChunk(const base::StringPiece& payload, |
105 char* output, | 107 char* output, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 int upload_error_; | 268 int upload_error_; |
267 | 269 |
268 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 270 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
269 | 271 |
270 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 272 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
271 }; | 273 }; |
272 | 274 |
273 } // namespace net | 275 } // namespace net |
274 | 276 |
275 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 277 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |