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

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

Issue 2093873002: Unwind fallback metrics and SSLFailureState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "crypto/ec_private_key.h" 17 #include "crypto/ec_private_key.h"
18 #include "net/base/net_error_details.h" 18 #include "net/base/net_error_details.h"
19 #include "net/base/request_priority.h" 19 #include "net/base/request_priority.h"
20 #include "net/http/http_auth.h" 20 #include "net/http/http_auth.h"
21 #include "net/http/http_request_headers.h" 21 #include "net/http/http_request_headers.h"
22 #include "net/http/http_response_info.h" 22 #include "net/http/http_response_info.h"
23 #include "net/http/http_stream_factory.h" 23 #include "net/http/http_stream_factory.h"
24 #include "net/http/http_transaction.h" 24 #include "net/http/http_transaction.h"
25 #include "net/log/net_log.h" 25 #include "net/log/net_log.h"
26 #include "net/proxy/proxy_service.h" 26 #include "net/proxy/proxy_service.h"
27 #include "net/socket/connection_attempts.h" 27 #include "net/socket/connection_attempts.h"
28 #include "net/ssl/channel_id_service.h" 28 #include "net/ssl/channel_id_service.h"
29 #include "net/ssl/ssl_config_service.h" 29 #include "net/ssl/ssl_config_service.h"
30 #include "net/ssl/ssl_failure_state.h"
31 #include "net/websockets/websocket_handshake_stream_base.h" 30 #include "net/websockets/websocket_handshake_stream_base.h"
32 31
33 namespace crypto { 32 namespace crypto {
34 class ECPrivateKey; 33 class ECPrivateKey;
35 } 34 }
36 35
37 namespace net { 36 namespace net {
38 37
39 class BidirectionalStreamImpl; 38 class BidirectionalStreamImpl;
40 class ClientSocketHandle; 39 class ClientSocketHandle;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void OnStreamReady(const SSLConfig& used_ssl_config, 96 void OnStreamReady(const SSLConfig& used_ssl_config,
98 const ProxyInfo& used_proxy_info, 97 const ProxyInfo& used_proxy_info,
99 HttpStream* stream) override; 98 HttpStream* stream) override;
100 void OnBidirectionalStreamImplReady(const SSLConfig& used_ssl_config, 99 void OnBidirectionalStreamImplReady(const SSLConfig& used_ssl_config,
101 const ProxyInfo& used_proxy_info, 100 const ProxyInfo& used_proxy_info,
102 BidirectionalStreamImpl* stream) override; 101 BidirectionalStreamImpl* stream) override;
103 void OnWebSocketHandshakeStreamReady( 102 void OnWebSocketHandshakeStreamReady(
104 const SSLConfig& used_ssl_config, 103 const SSLConfig& used_ssl_config,
105 const ProxyInfo& used_proxy_info, 104 const ProxyInfo& used_proxy_info,
106 WebSocketHandshakeStreamBase* stream) override; 105 WebSocketHandshakeStreamBase* stream) override;
107 void OnStreamFailed(int status, 106 void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override;
108 const SSLConfig& used_ssl_config,
109 SSLFailureState ssl_failure_state) override;
110 void OnCertificateError(int status, 107 void OnCertificateError(int status,
111 const SSLConfig& used_ssl_config, 108 const SSLConfig& used_ssl_config,
112 const SSLInfo& ssl_info) override; 109 const SSLInfo& ssl_info) override;
113 void OnNeedsProxyAuth(const HttpResponseInfo& response_info, 110 void OnNeedsProxyAuth(const HttpResponseInfo& response_info,
114 const SSLConfig& used_ssl_config, 111 const SSLConfig& used_ssl_config,
115 const ProxyInfo& used_proxy_info, 112 const ProxyInfo& used_proxy_info,
116 HttpAuthController* auth_controller) override; 113 HttpAuthController* auth_controller) override;
117 void OnNeedsClientAuth(const SSLConfig& used_ssl_config, 114 void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
118 SSLCertRequestInfo* cert_info) override; 115 SSLCertRequestInfo* cert_info) override;
119 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, 116 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 ProxyInfo proxy_info_; 323 ProxyInfo proxy_info_;
327 324
328 std::unique_ptr<HttpStreamRequest> stream_request_; 325 std::unique_ptr<HttpStreamRequest> stream_request_;
329 std::unique_ptr<HttpStream> stream_; 326 std::unique_ptr<HttpStream> stream_;
330 327
331 // True if we've validated the headers that the stream parser has returned. 328 // True if we've validated the headers that the stream parser has returned.
332 bool headers_valid_; 329 bool headers_valid_;
333 330
334 SSLConfig server_ssl_config_; 331 SSLConfig server_ssl_config_;
335 SSLConfig proxy_ssl_config_; 332 SSLConfig proxy_ssl_config_;
336 // The SSLFailureState of the most recent failed stream.
337 SSLFailureState server_ssl_failure_state_;
338 // fallback_error_code contains the error code that caused the last TLS 333 // fallback_error_code contains the error code that caused the last TLS
339 // fallback. If the fallback connection results in 334 // fallback. If the fallback connection results in
340 // ERR_SSL_INAPPROPRIATE_FALLBACK (i.e. the server indicated that the 335 // ERR_SSL_INAPPROPRIATE_FALLBACK (i.e. the server indicated that the
341 // fallback should not have been needed) then we use this value to return the 336 // fallback should not have been needed) then we use this value to return the
342 // original error that triggered the fallback. 337 // original error that triggered the fallback.
343 int fallback_error_code_; 338 int fallback_error_code_;
344 // The SSLFailureState which caused the last TLS version fallback.
345 SSLFailureState fallback_failure_state_;
346 339
347 // Keys to use for signing message in Token Binding header. 340 // Keys to use for signing message in Token Binding header.
348 std::unique_ptr<crypto::ECPrivateKey> provided_token_binding_key_; 341 std::unique_ptr<crypto::ECPrivateKey> provided_token_binding_key_;
349 std::unique_ptr<crypto::ECPrivateKey> referred_token_binding_key_; 342 std::unique_ptr<crypto::ECPrivateKey> referred_token_binding_key_;
350 // Object to manage lookup of |provided_token_binding_key_| and 343 // Object to manage lookup of |provided_token_binding_key_| and
351 // |referred_token_binding_key_|. 344 // |referred_token_binding_key_|.
352 ChannelIDService::Request token_binding_request_; 345 ChannelIDService::Request token_binding_request_;
353 346
354 HttpRequestHeaders request_headers_; 347 HttpRequestHeaders request_headers_;
355 348
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 ConnectionAttempts connection_attempts_; 386 ConnectionAttempts connection_attempts_;
394 IPEndPoint remote_endpoint_; 387 IPEndPoint remote_endpoint_;
395 // Network error details for this transaction. 388 // Network error details for this transaction.
396 NetErrorDetails net_error_details_; 389 NetErrorDetails net_error_details_;
397 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); 390 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
398 }; 391 };
399 392
400 } // namespace net 393 } // namespace net
401 394
402 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ 395 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698