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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
| 18 #include "crypto/ec_private_key.h" |
18 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
19 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
20 #include "net/base/upload_progress.h" | 21 #include "net/base/upload_progress.h" |
21 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
22 | 23 |
23 namespace net { | 24 namespace net { |
24 | 25 |
25 class ClientSocketHandle; | 26 class ClientSocketHandle; |
26 class DrainableIOBuffer; | 27 class DrainableIOBuffer; |
27 class GrowableIOBuffer; | 28 class GrowableIOBuffer; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bool CanReuseConnection() const; | 89 bool CanReuseConnection() const; |
89 | 90 |
90 int64_t received_bytes() const { return received_bytes_; } | 91 int64_t received_bytes() const { return received_bytes_; } |
91 | 92 |
92 int64_t sent_bytes() const { return sent_bytes_; } | 93 int64_t sent_bytes() const { return sent_bytes_; } |
93 | 94 |
94 void GetSSLInfo(SSLInfo* ssl_info); | 95 void GetSSLInfo(SSLInfo* ssl_info); |
95 | 96 |
96 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); | 97 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); |
97 | 98 |
| 99 int GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 100 std::vector<uint8_t>* out); |
| 101 |
98 // Encodes the given |payload| in the chunked format to |output|. | 102 // Encodes the given |payload| in the chunked format to |output|. |
99 // Returns the number of bytes written to |output|. |output_size| should | 103 // Returns the number of bytes written to |output|. |output_size| should |
100 // be large enough to store the encoded chunk, which is payload.size() + | 104 // be large enough to store the encoded chunk, which is payload.size() + |
101 // kChunkHeaderFooterSize. Returns ERR_INVALID_ARGUMENT if |output_size| | 105 // kChunkHeaderFooterSize. Returns ERR_INVALID_ARGUMENT if |output_size| |
102 // is not large enough. | 106 // is not large enough. |
103 // | 107 // |
104 // The output will look like: "HEX\r\n[payload]\r\n" | 108 // The output will look like: "HEX\r\n[payload]\r\n" |
105 // where HEX is a length in hexdecimal (without the "0x" prefix). | 109 // where HEX is a length in hexdecimal (without the "0x" prefix). |
106 static int EncodeChunk(const base::StringPiece& payload, | 110 static int EncodeChunk(const base::StringPiece& payload, |
107 char* output, | 111 char* output, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 int upload_error_; | 272 int upload_error_; |
269 | 273 |
270 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 274 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
271 | 275 |
272 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 276 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
273 }; | 277 }; |
274 | 278 |
275 } // namespace net | 279 } // namespace net |
276 | 280 |
277 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 281 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |