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

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

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: fix build issues 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 #include "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/base64url.h"
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/format_macros.h" 15 #include "base/format_macros.h"
15 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
16 #include "base/metrics/field_trial.h" 17 #include "base/metrics/field_trial.h"
17 #include "base/metrics/histogram_macros.h" 18 #include "base/metrics/histogram_macros.h"
18 #include "base/metrics/sparse_histogram.h" 19 #include "base/metrics/sparse_histogram.h"
19 #include "base/profiler/scoped_tracker.h" 20 #include "base/profiler/scoped_tracker.h"
20 #include "base/stl_util.h" 21 #include "base/stl_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "net/socket/socks_client_socket_pool.h" 56 #include "net/socket/socks_client_socket_pool.h"
56 #include "net/socket/ssl_client_socket.h" 57 #include "net/socket/ssl_client_socket.h"
57 #include "net/socket/ssl_client_socket_pool.h" 58 #include "net/socket/ssl_client_socket_pool.h"
58 #include "net/socket/transport_client_socket_pool.h" 59 #include "net/socket/transport_client_socket_pool.h"
59 #include "net/spdy/spdy_http_stream.h" 60 #include "net/spdy/spdy_http_stream.h"
60 #include "net/spdy/spdy_session.h" 61 #include "net/spdy/spdy_session.h"
61 #include "net/spdy/spdy_session_pool.h" 62 #include "net/spdy/spdy_session_pool.h"
62 #include "net/ssl/ssl_cert_request_info.h" 63 #include "net/ssl/ssl_cert_request_info.h"
63 #include "net/ssl/ssl_connection_status_flags.h" 64 #include "net/ssl/ssl_connection_status_flags.h"
64 #include "net/ssl/ssl_private_key.h" 65 #include "net/ssl/ssl_private_key.h"
66 #include "net/ssl/token_binding.h"
65 #include "url/gurl.h" 67 #include "url/gurl.h"
66 #include "url/url_canon.h" 68 #include "url/url_canon.h"
67 69
68 namespace net { 70 namespace net {
69 71
70 namespace { 72 namespace {
71 73
72 void ProcessAlternativeServices(HttpNetworkSession* session, 74 void ProcessAlternativeServices(HttpNetworkSession* session,
73 const HttpResponseHeaders& headers, 75 const HttpResponseHeaders& headers,
74 const HostPortPair& http_host_port_pair) { 76 const HostPortPair& http_host_port_pair) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 proxy_ssl_config_.rev_checking_enabled = false; 196 proxy_ssl_config_.rev_checking_enabled = false;
195 } 197 }
196 198
197 if (request_->load_flags & LOAD_PREFETCH) 199 if (request_->load_flags & LOAD_PREFETCH)
198 response_.unused_since_prefetch = true; 200 response_.unused_since_prefetch = true;
199 201
200 // Channel ID is disabled if privacy mode is enabled for this request. 202 // Channel ID is disabled if privacy mode is enabled for this request.
201 if (request_->privacy_mode == PRIVACY_MODE_ENABLED) 203 if (request_->privacy_mode == PRIVACY_MODE_ENABLED)
202 server_ssl_config_.channel_id_enabled = false; 204 server_ssl_config_.channel_id_enabled = false;
203 205
206 if (session_->params().enable_token_binding &&
207 session_->params().channel_id_service) {
208 server_ssl_config_.token_binding_params.push_back(TB_PARAM_ECDSAP256);
209 }
210
204 next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM; 211 next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM;
205 int rv = DoLoop(OK); 212 int rv = DoLoop(OK);
206 if (rv == ERR_IO_PENDING) 213 if (rv == ERR_IO_PENDING)
207 callback_ = callback; 214 callback_ = callback;
208 return rv; 215 return rv;
209 } 216 }
210 217
211 int HttpNetworkTransaction::RestartIgnoringLastError( 218 int HttpNetworkTransaction::RestartIgnoringLastError(
212 const CompletionCallback& callback) { 219 const CompletionCallback& callback) {
213 DCHECK(!stream_.get()); 220 DCHECK(!stream_.get());
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 639
633 void HttpNetworkTransaction::GetConnectionAttempts( 640 void HttpNetworkTransaction::GetConnectionAttempts(
634 ConnectionAttempts* out) const { 641 ConnectionAttempts* out) const {
635 *out = connection_attempts_; 642 *out = connection_attempts_;
636 } 643 }
637 644
638 bool HttpNetworkTransaction::IsSecureRequest() const { 645 bool HttpNetworkTransaction::IsSecureRequest() const {
639 return request_->url.SchemeIsCryptographic(); 646 return request_->url.SchemeIsCryptographic();
640 } 647 }
641 648
649 bool HttpNetworkTransaction::IsTokenBindingEnabled() const {
650 if (!IsSecureRequest())
651 return false;
652 SSLInfo ssl_info;
653 stream_->GetSSLInfo(&ssl_info);
654 if (!ssl_info.token_binding_negotiated)
655 return false;
656 if (ssl_info.token_binding_key_param != TB_PARAM_ECDSAP256)
657 return false;
658 if (!session_->params().channel_id_service)
659 return false;
660 return true;
davidben 2016/01/22 00:19:20 Nit: You could also just write return ssl_info.
nharper 2016/01/22 19:36:51 If there's a bug in the code elsewhere, it's possi
661 }
662
663 void HttpNetworkTransaction::RecordTokenBindingSupport() const {
664 enum {
665 DISABLED = 0,
666 CLIENT_ONLY = 1,
667 CLIENT_AND_SERVER = 2,
668 CLIENT_NO_CHANNEL_ID_SERVICE = 3,
669 TOKEN_BINDING_SUPPORT_MAX
670 } supported;
671 if (!IsSecureRequest())
672 return;
673 SSLInfo ssl_info;
674 stream_->GetSSLInfo(&ssl_info);
675 if (!session_->params().enable_token_binding) {
676 supported = DISABLED;
677 } else if (!session_->params().channel_id_service) {
678 supported = CLIENT_NO_CHANNEL_ID_SERVICE;
679 } else if (ssl_info.token_binding_negotiated) {
680 supported = CLIENT_AND_SERVER;
681 } else {
682 supported = CLIENT_ONLY;
683 }
684 UMA_HISTOGRAM_ENUMERATION("Net.TokenBinding.Support", supported,
685 TOKEN_BINDING_SUPPORT_MAX);
686 }
687
642 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const { 688 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const {
643 return (proxy_info_.is_http() || proxy_info_.is_https() || 689 return (proxy_info_.is_http() || proxy_info_.is_https() ||
644 proxy_info_.is_quic()) && 690 proxy_info_.is_quic()) &&
645 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS()); 691 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS());
646 } 692 }
647 693
648 void HttpNetworkTransaction::DoCallback(int rv) { 694 void HttpNetworkTransaction::DoCallback(int rv) {
649 DCHECK_NE(rv, ERR_IO_PENDING); 695 DCHECK_NE(rv, ERR_IO_PENDING);
650 DCHECK(!callback_.is_null()); 696 DCHECK(!callback_.is_null());
651 697
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 case STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE: 740 case STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE:
695 rv = DoGenerateProxyAuthTokenComplete(rv); 741 rv = DoGenerateProxyAuthTokenComplete(rv);
696 break; 742 break;
697 case STATE_GENERATE_SERVER_AUTH_TOKEN: 743 case STATE_GENERATE_SERVER_AUTH_TOKEN:
698 DCHECK_EQ(OK, rv); 744 DCHECK_EQ(OK, rv);
699 rv = DoGenerateServerAuthToken(); 745 rv = DoGenerateServerAuthToken();
700 break; 746 break;
701 case STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE: 747 case STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE:
702 rv = DoGenerateServerAuthTokenComplete(rv); 748 rv = DoGenerateServerAuthTokenComplete(rv);
703 break; 749 break;
750 case STATE_GET_TOKEN_BINDING_KEY:
751 DCHECK_EQ(OK, rv);
752 rv = DoGetTokenBindingKey();
753 break;
754 case STATE_GET_TOKEN_BINDING_KEY_COMPLETE:
755 rv = DoGetTokenBindingKeyComplete(rv);
756 break;
704 case STATE_INIT_REQUEST_BODY: 757 case STATE_INIT_REQUEST_BODY:
705 DCHECK_EQ(OK, rv); 758 DCHECK_EQ(OK, rv);
706 rv = DoInitRequestBody(); 759 rv = DoInitRequestBody();
707 break; 760 break;
708 case STATE_INIT_REQUEST_BODY_COMPLETE: 761 case STATE_INIT_REQUEST_BODY_COMPLETE:
709 rv = DoInitRequestBodyComplete(rv); 762 rv = DoInitRequestBodyComplete(rv);
710 break; 763 break;
711 case STATE_BUILD_REQUEST: 764 case STATE_BUILD_REQUEST:
712 DCHECK_EQ(OK, rv); 765 DCHECK_EQ(OK, rv);
713 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST); 766 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 if (!ShouldApplyServerAuth()) 962 if (!ShouldApplyServerAuth())
910 return OK; 963 return OK;
911 return auth_controllers_[target]->MaybeGenerateAuthToken(request_, 964 return auth_controllers_[target]->MaybeGenerateAuthToken(request_,
912 io_callback_, 965 io_callback_,
913 net_log_); 966 net_log_);
914 } 967 }
915 968
916 int HttpNetworkTransaction::DoGenerateServerAuthTokenComplete(int rv) { 969 int HttpNetworkTransaction::DoGenerateServerAuthTokenComplete(int rv) {
917 DCHECK_NE(ERR_IO_PENDING, rv); 970 DCHECK_NE(ERR_IO_PENDING, rv);
918 if (rv == OK) 971 if (rv == OK)
919 next_state_ = STATE_INIT_REQUEST_BODY; 972 next_state_ = STATE_GET_TOKEN_BINDING_KEY;
920 return rv; 973 return rv;
921 } 974 }
922 975
923 void HttpNetworkTransaction::BuildRequestHeaders( 976 int HttpNetworkTransaction::DoGetTokenBindingKey() {
977 next_state_ = STATE_GET_TOKEN_BINDING_KEY_COMPLETE;
978 if (!IsTokenBindingEnabled())
979 return OK;
980
981 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_GET_TOKEN_BINDING_KEY);
982 ChannelIDService* channel_id_service = session_->params().channel_id_service;
983 return channel_id_service->GetOrCreateChannelID(
984 request_->url.host(), &token_binding_key_, io_callback_,
985 &token_binding_request_);
986 }
987
988 int HttpNetworkTransaction::DoGetTokenBindingKeyComplete(int rv) {
989 DCHECK_NE(ERR_IO_PENDING, rv);
990 next_state_ = STATE_INIT_REQUEST_BODY;
991 if (!IsTokenBindingEnabled())
992 return OK;
993
994 if (rv == OK && !token_binding_key_)
995 rv = ERR_CHANNEL_ID_IMPORT_FAILED;
davidben 2016/01/22 00:19:20 Pfft. Apparently this dates to https://codereview.
nharper 2016/01/22 19:36:51 This statement is now removed.
996
997 net_log_.EndEventWithNetErrorCode(
998 NetLog::TYPE_HTTP_TRANSACTION_GET_TOKEN_BINDING_KEY, rv);
999 return rv;
1000 }
1001
1002 int HttpNetworkTransaction::BuildRequestHeaders(
924 bool using_http_proxy_without_tunnel) { 1003 bool using_http_proxy_without_tunnel) {
925 request_headers_.SetHeader(HttpRequestHeaders::kHost, 1004 request_headers_.SetHeader(HttpRequestHeaders::kHost,
926 GetHostAndOptionalPort(request_->url)); 1005 GetHostAndOptionalPort(request_->url));
927 1006
928 // For compat with HTTP/1.0 servers and proxies: 1007 // For compat with HTTP/1.0 servers and proxies:
929 if (using_http_proxy_without_tunnel) { 1008 if (using_http_proxy_without_tunnel) {
930 request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection, 1009 request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection,
931 "keep-alive"); 1010 "keep-alive");
932 } else { 1011 } else {
933 request_headers_.SetHeader(HttpRequestHeaders::kConnection, "keep-alive"); 1012 request_headers_.SetHeader(HttpRequestHeaders::kConnection, "keep-alive");
(...skipping 12 matching lines...) Expand all
946 } else if (request_->method == "POST" || request_->method == "PUT") { 1025 } else if (request_->method == "POST" || request_->method == "PUT") {
947 // An empty POST/PUT request still needs a content length. As for HEAD, 1026 // An empty POST/PUT request still needs a content length. As for HEAD,
948 // IE and Safari also add a content length header. Presumably it is to 1027 // IE and Safari also add a content length header. Presumably it is to
949 // support sending a HEAD request to an URL that only expects to be sent a 1028 // support sending a HEAD request to an URL that only expects to be sent a
950 // POST or some other method that normally would have a message body. 1029 // POST or some other method that normally would have a message body.
951 // Firefox (40.0) does not send the header, and RFC 7230 & 7231 1030 // Firefox (40.0) does not send the header, and RFC 7230 & 7231
952 // specify that it should not be sent due to undefined behavior. 1031 // specify that it should not be sent due to undefined behavior.
953 request_headers_.SetHeader(HttpRequestHeaders::kContentLength, "0"); 1032 request_headers_.SetHeader(HttpRequestHeaders::kContentLength, "0");
954 } 1033 }
955 1034
1035 RecordTokenBindingSupport();
1036 if (token_binding_key_) {
1037 std::string token_binding_header;
1038 int rv = BuildTokenBindingHeader(&token_binding_header);
1039 if (rv != OK)
1040 return rv;
1041 request_headers_.SetHeader(HttpRequestHeaders::kTokenBinding,
1042 token_binding_header);
1043 }
1044
956 // Honor load flags that impact proxy caches. 1045 // Honor load flags that impact proxy caches.
957 if (request_->load_flags & LOAD_BYPASS_CACHE) { 1046 if (request_->load_flags & LOAD_BYPASS_CACHE) {
958 request_headers_.SetHeader(HttpRequestHeaders::kPragma, "no-cache"); 1047 request_headers_.SetHeader(HttpRequestHeaders::kPragma, "no-cache");
959 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "no-cache"); 1048 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "no-cache");
960 } else if (request_->load_flags & LOAD_VALIDATE_CACHE) { 1049 } else if (request_->load_flags & LOAD_VALIDATE_CACHE) {
961 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0"); 1050 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0");
962 } 1051 }
963 1052
964 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) 1053 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY))
965 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( 1054 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader(
966 &request_headers_); 1055 &request_headers_);
967 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) 1056 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER))
968 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( 1057 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader(
969 &request_headers_); 1058 &request_headers_);
970 1059
971 request_headers_.MergeFrom(request_->extra_headers); 1060 request_headers_.MergeFrom(request_->extra_headers);
972 1061
973 if (using_http_proxy_without_tunnel && 1062 if (using_http_proxy_without_tunnel &&
974 !before_proxy_headers_sent_callback_.is_null()) 1063 !before_proxy_headers_sent_callback_.is_null())
975 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_); 1064 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_);
976 1065
977 response_.did_use_http_auth = 1066 response_.did_use_http_auth =
978 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || 1067 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) ||
979 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); 1068 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization);
1069 return OK;
1070 }
1071
1072 int HttpNetworkTransaction::BuildTokenBindingHeader(std::string* out) {
1073 std::vector<uint8_t> signed_ekm;
1074 int rv = stream_->GetSignedEKMForTokenBinding(token_binding_key_.get(),
1075 &signed_ekm);
1076 if (rv != OK)
1077 return rv;
1078 std::string provided_token_binding;
1079 rv = BuildProvidedTokenBinding(token_binding_key_.get(), signed_ekm,
1080 &provided_token_binding);
1081 if (rv != OK)
1082 return rv;
1083 std::vector<base::StringPiece> token_bindings;
1084 token_bindings.push_back(provided_token_binding);
1085 std::string header;
1086 rv = BuildTokenBindingMessageFromTokenBindings(token_bindings, &header);
davidben 2016/01/22 00:19:20 You could probably fold this and BuildProvidedToke
nharper 2016/01/22 19:36:52 Once we support the federated use case (i.e. refer
1087 if (rv != OK)
1088 return rv;
1089 base::Base64UrlEncode(header, base::Base64UrlEncodePolicy::INCLUDE_PADDING,
1090 out);
1091 return OK;
980 } 1092 }
981 1093
982 int HttpNetworkTransaction::DoInitRequestBody() { 1094 int HttpNetworkTransaction::DoInitRequestBody() {
983 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; 1095 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE;
984 int rv = OK; 1096 int rv = OK;
985 if (request_->upload_data_stream) 1097 if (request_->upload_data_stream)
986 rv = request_->upload_data_stream->Init(io_callback_); 1098 rv = request_->upload_data_stream->Init(io_callback_);
987 return rv; 1099 return rv;
988 } 1100 }
989 1101
990 int HttpNetworkTransaction::DoInitRequestBodyComplete(int result) { 1102 int HttpNetworkTransaction::DoInitRequestBodyComplete(int result) {
991 if (result == OK) 1103 if (result == OK)
992 next_state_ = STATE_BUILD_REQUEST; 1104 next_state_ = STATE_BUILD_REQUEST;
993 return result; 1105 return result;
994 } 1106 }
995 1107
996 int HttpNetworkTransaction::DoBuildRequest() { 1108 int HttpNetworkTransaction::DoBuildRequest() {
997 next_state_ = STATE_BUILD_REQUEST_COMPLETE; 1109 next_state_ = STATE_BUILD_REQUEST_COMPLETE;
998 headers_valid_ = false; 1110 headers_valid_ = false;
999 1111
1000 // This is constructed lazily (instead of within our Start method), so that 1112 // This is constructed lazily (instead of within our Start method), so that
1001 // we have proxy info available. 1113 // we have proxy info available.
1002 if (request_headers_.IsEmpty()) { 1114 if (request_headers_.IsEmpty()) {
1003 bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel(); 1115 bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel();
1004 BuildRequestHeaders(using_http_proxy_without_tunnel); 1116 return BuildRequestHeaders(using_http_proxy_without_tunnel);
1005 } 1117 }
1006 1118
1007 return OK; 1119 return OK;
1008 } 1120 }
1009 1121
1010 int HttpNetworkTransaction::DoBuildRequestComplete(int result) { 1122 int HttpNetworkTransaction::DoBuildRequestComplete(int result) {
1011 if (result == OK) 1123 if (result == OK)
1012 next_state_ = STATE_SEND_REQUEST; 1124 next_state_ = STATE_SEND_REQUEST;
1013 return result; 1125 return result;
1014 } 1126 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 pending_auth_target_ = HttpAuth::AUTH_NONE; 1591 pending_auth_target_ = HttpAuth::AUTH_NONE;
1480 read_buf_ = NULL; 1592 read_buf_ = NULL;
1481 read_buf_len_ = 0; 1593 read_buf_len_ = 0;
1482 headers_valid_ = false; 1594 headers_valid_ = false;
1483 request_headers_.Clear(); 1595 request_headers_.Clear();
1484 response_ = HttpResponseInfo(); 1596 response_ = HttpResponseInfo();
1485 establishing_tunnel_ = false; 1597 establishing_tunnel_ = false;
1486 remote_endpoint_ = IPEndPoint(); 1598 remote_endpoint_ = IPEndPoint();
1487 net_error_details_.quic_broken = false; 1599 net_error_details_.quic_broken = false;
1488 net_error_details_.quic_connection_error = QUIC_NO_ERROR; 1600 net_error_details_.quic_connection_error = QUIC_NO_ERROR;
1601 token_binding_key_.reset();
1489 } 1602 }
1490 1603
1491 void HttpNetworkTransaction::CacheNetErrorDetailsAndResetStream() { 1604 void HttpNetworkTransaction::CacheNetErrorDetailsAndResetStream() {
1492 if (stream_) 1605 if (stream_)
1493 stream_->PopulateNetErrorDetails(&net_error_details_); 1606 stream_->PopulateNetErrorDetails(&net_error_details_);
1494 stream_.reset(); 1607 stream_.reset();
1495 } 1608 }
1496 1609
1497 void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) { 1610 void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) {
1498 if (result != OK && result != ERR_SSL_INAPPROPRIATE_FALLBACK) 1611 if (result != OK && result != ERR_SSL_INAPPROPRIATE_FALLBACK)
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 DCHECK(stream_request_); 1822 DCHECK(stream_request_);
1710 1823
1711 // Since the transaction can restart with auth credentials, it may create a 1824 // Since the transaction can restart with auth credentials, it may create a
1712 // stream more than once. Accumulate all of the connection attempts across 1825 // stream more than once. Accumulate all of the connection attempts across
1713 // those streams by appending them to the vector: 1826 // those streams by appending them to the vector:
1714 for (const auto& attempt : stream_request_->connection_attempts()) 1827 for (const auto& attempt : stream_request_->connection_attempts())
1715 connection_attempts_.push_back(attempt); 1828 connection_attempts_.push_back(attempt);
1716 } 1829 }
1717 1830
1718 } // namespace net 1831 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698