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

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

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Remove sequence numbers from mock reads Created 4 years, 11 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
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 // HttpStream provides an abstraction for a basic http streams, SPDY, and QUIC. 5 // HttpStream provides an abstraction for a basic http streams, SPDY, and QUIC.
6 // The HttpStream subtype is expected to manage the underlying transport 6 // The HttpStream subtype is expected to manage the underlying transport
7 // appropriately. For example, a basic http stream will return the transport 7 // appropriately. For example, a basic http stream will return the transport
8 // socket to the pool for reuse. SPDY streams on the other hand leave the 8 // socket to the pool for reuse. SPDY streams on the other hand leave the
9 // transport socket management to the SpdySession. 9 // transport socket management to the SpdySession.
10 10
11 #ifndef NET_HTTP_HTTP_STREAM_H_ 11 #ifndef NET_HTTP_HTTP_STREAM_H_
12 #define NET_HTTP_HTTP_STREAM_H_ 12 #define NET_HTTP_HTTP_STREAM_H_
13 13
14 #include <stdint.h> 14 #include <stdint.h>
15 15
16 #include <vector>
17
16 #include "base/macros.h" 18 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
18 #include "net/base/completion_callback.h" 20 #include "net/base/completion_callback.h"
19 #include "net/base/net_error_details.h" 21 #include "net/base/net_error_details.h"
22 #include "net/base/net_errors.h"
20 #include "net/base/net_export.h" 23 #include "net/base/net_export.h"
21 #include "net/base/request_priority.h" 24 #include "net/base/request_priority.h"
22 #include "net/base/upload_progress.h" 25 #include "net/base/upload_progress.h"
23 26
27 namespace crypto {
28 class ECPrivateKey;
29 }
30
24 namespace net { 31 namespace net {
25 32
26 class BoundNetLog; 33 class BoundNetLog;
27 class HttpNetworkSession; 34 class HttpNetworkSession;
28 class HttpRequestHeaders; 35 class HttpRequestHeaders;
29 struct HttpRequestInfo; 36 struct HttpRequestInfo;
30 class HttpResponseInfo; 37 class HttpResponseInfo;
31 class IOBuffer; 38 class IOBuffer;
32 class IPEndPoint; 39 class IPEndPoint;
33 struct LoadTimingInfo; 40 struct LoadTimingInfo;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Get the SSLCertRequestInfo associated with this stream's connection. 151 // Get the SSLCertRequestInfo associated with this stream's connection.
145 // This should only be called for streams over SSL sockets, otherwise the 152 // This should only be called for streams over SSL sockets, otherwise the
146 // behavior is undefined. 153 // behavior is undefined.
147 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0; 154 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0;
148 155
149 // Gets the remote endpoint of the socket that the HTTP stream is using, if 156 // Gets the remote endpoint of the socket that the HTTP stream is using, if
150 // any. Returns true and fills in |endpoint| if it is available; returns false 157 // any. Returns true and fills in |endpoint| if it is available; returns false
151 // and does not modify |endpoint| if it is unavailable. 158 // and does not modify |endpoint| if it is unavailable.
152 virtual bool GetRemoteEndpoint(IPEndPoint* endpoint) = 0; 159 virtual bool GetRemoteEndpoint(IPEndPoint* endpoint) = 0;
153 160
161 // Signs the EKM value for Token Binding from the TLS layer using |*key| and
162 // puts the result in |*out|. Returns OK or ERR_FAILED.
163 virtual Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key,
164 std::vector<uint8_t>* out) = 0;
165
154 // In the case of an HTTP error or redirect, flush the response body (usually 166 // In the case of an HTTP error or redirect, flush the response body (usually
155 // a simple error or "this page has moved") so that we can re-use the 167 // a simple error or "this page has moved") so that we can re-use the
156 // underlying connection. This stream is responsible for deleting itself when 168 // underlying connection. This stream is responsible for deleting itself when
157 // draining is complete. 169 // draining is complete.
158 virtual void Drain(HttpNetworkSession* session) = 0; 170 virtual void Drain(HttpNetworkSession* session) = 0;
159 171
160 // Get the network error details this stream is encountering. 172 // Get the network error details this stream is encountering.
161 // Fills in |details| if it is available; leaves |details| unchanged if it 173 // Fills in |details| if it is available; leaves |details| unchanged if it
162 // is unavailable. 174 // is unavailable.
163 virtual void PopulateNetErrorDetails(NetErrorDetails* details) = 0; 175 virtual void PopulateNetErrorDetails(NetErrorDetails* details) = 0;
(...skipping 11 matching lines...) Expand all
175 // subclass does not support renewing the stream, NULL is returned. 187 // subclass does not support renewing the stream, NULL is returned.
176 virtual HttpStream* RenewStreamForAuth() = 0; 188 virtual HttpStream* RenewStreamForAuth() = 0;
177 189
178 private: 190 private:
179 DISALLOW_COPY_AND_ASSIGN(HttpStream); 191 DISALLOW_COPY_AND_ASSIGN(HttpStream);
180 }; 192 };
181 193
182 } // namespace net 194 } // namespace net
183 195
184 #endif // NET_HTTP_HTTP_STREAM_H_ 196 #endif // NET_HTTP_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698