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

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

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Add UMA logging of Token Binding support and NetLog event for Token Binding key lookup Created 5 years, 1 month 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
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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/strings/string_piece.h" 16 #include "base/strings/string_piece.h"
17 #include "crypto/ec_private_key.h"
17 #include "net/base/completion_callback.h" 18 #include "net/base/completion_callback.h"
18 #include "net/base/net_export.h" 19 #include "net/base/net_export.h"
19 #include "net/base/upload_progress.h" 20 #include "net/base/upload_progress.h"
20 #include "net/log/net_log.h" 21 #include "net/log/net_log.h"
21 22
22 namespace net { 23 namespace net {
23 24
24 class ClientSocketHandle; 25 class ClientSocketHandle;
25 class DrainableIOBuffer; 26 class DrainableIOBuffer;
26 class GrowableIOBuffer; 27 class GrowableIOBuffer;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool CanReuseConnection() const; 87 bool CanReuseConnection() const;
87 88
88 int64_t received_bytes() const { return received_bytes_; } 89 int64_t received_bytes() const { return received_bytes_; }
89 90
90 int64_t sent_bytes() const { return sent_bytes_; } 91 int64_t sent_bytes() const { return sent_bytes_; }
91 92
92 void GetSSLInfo(SSLInfo* ssl_info); 93 void GetSSLInfo(SSLInfo* ssl_info);
93 94
94 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); 95 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info);
95 96
97 int GetProvidedTokenBindingWithKey(
98 const scoped_ptr<crypto::ECPrivateKey>& key,
99 std::string* header_out);
100
96 // Encodes the given |payload| in the chunked format to |output|. 101 // Encodes the given |payload| in the chunked format to |output|.
97 // Returns the number of bytes written to |output|. |output_size| should 102 // Returns the number of bytes written to |output|. |output_size| should
98 // be large enough to store the encoded chunk, which is payload.size() + 103 // be large enough to store the encoded chunk, which is payload.size() +
99 // kChunkHeaderFooterSize. Returns ERR_INVALID_ARGUMENT if |output_size| 104 // kChunkHeaderFooterSize. Returns ERR_INVALID_ARGUMENT if |output_size|
100 // is not large enough. 105 // is not large enough.
101 // 106 //
102 // The output will look like: "HEX\r\n[payload]\r\n" 107 // The output will look like: "HEX\r\n[payload]\r\n"
103 // where HEX is a length in hexdecimal (without the "0x" prefix). 108 // where HEX is a length in hexdecimal (without the "0x" prefix).
104 static int EncodeChunk(const base::StringPiece& payload, 109 static int EncodeChunk(const base::StringPiece& payload,
105 char* output, 110 char* output,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 int upload_error_; 271 int upload_error_;
267 272
268 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; 273 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_;
269 274
270 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); 275 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser);
271 }; 276 };
272 277
273 } // namespace net 278 } // namespace net
274 279
275 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ 280 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698