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

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: Remove sequence numbers from mock reads Created 4 years, 10 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 return ssl_info.token_binding_negotiated &&
655 ssl_info.token_binding_key_param == TB_PARAM_ECDSAP256 &&
656 session_->params().channel_id_service;
657 }
658
659 void HttpNetworkTransaction::RecordTokenBindingSupport() const {
660 // This enum is used for an UMA histogram - do not change or re-use values.
661 enum {
662 DISABLED = 0,
663 CLIENT_ONLY = 1,
664 CLIENT_AND_SERVER = 2,
665 CLIENT_NO_CHANNEL_ID_SERVICE = 3,
666 TOKEN_BINDING_SUPPORT_MAX
667 } supported;
668 if (!IsSecureRequest())
669 return;
670 SSLInfo ssl_info;
671 stream_->GetSSLInfo(&ssl_info);
672 if (!session_->params().enable_token_binding) {
673 supported = DISABLED;
674 } else if (!session_->params().channel_id_service) {
675 supported = CLIENT_NO_CHANNEL_ID_SERVICE;
676 } else if (ssl_info.token_binding_negotiated) {
677 supported = CLIENT_AND_SERVER;
678 } else {
679 supported = CLIENT_ONLY;
680 }
681 UMA_HISTOGRAM_ENUMERATION("Net.TokenBinding.Support", supported,
682 TOKEN_BINDING_SUPPORT_MAX);
683 }
684
642 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const { 685 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const {
643 return (proxy_info_.is_http() || proxy_info_.is_https() || 686 return (proxy_info_.is_http() || proxy_info_.is_https() ||
644 proxy_info_.is_quic()) && 687 proxy_info_.is_quic()) &&
645 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS()); 688 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS());
646 } 689 }
647 690
648 void HttpNetworkTransaction::DoCallback(int rv) { 691 void HttpNetworkTransaction::DoCallback(int rv) {
649 DCHECK_NE(rv, ERR_IO_PENDING); 692 DCHECK_NE(rv, ERR_IO_PENDING);
650 DCHECK(!callback_.is_null()); 693 DCHECK(!callback_.is_null());
651 694
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 case STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE: 737 case STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE:
695 rv = DoGenerateProxyAuthTokenComplete(rv); 738 rv = DoGenerateProxyAuthTokenComplete(rv);
696 break; 739 break;
697 case STATE_GENERATE_SERVER_AUTH_TOKEN: 740 case STATE_GENERATE_SERVER_AUTH_TOKEN:
698 DCHECK_EQ(OK, rv); 741 DCHECK_EQ(OK, rv);
699 rv = DoGenerateServerAuthToken(); 742 rv = DoGenerateServerAuthToken();
700 break; 743 break;
701 case STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE: 744 case STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE:
702 rv = DoGenerateServerAuthTokenComplete(rv); 745 rv = DoGenerateServerAuthTokenComplete(rv);
703 break; 746 break;
747 case STATE_GET_TOKEN_BINDING_KEY:
748 DCHECK_EQ(OK, rv);
749 rv = DoGetTokenBindingKey();
750 break;
751 case STATE_GET_TOKEN_BINDING_KEY_COMPLETE:
752 rv = DoGetTokenBindingKeyComplete(rv);
753 break;
704 case STATE_INIT_REQUEST_BODY: 754 case STATE_INIT_REQUEST_BODY:
705 DCHECK_EQ(OK, rv); 755 DCHECK_EQ(OK, rv);
706 rv = DoInitRequestBody(); 756 rv = DoInitRequestBody();
707 break; 757 break;
708 case STATE_INIT_REQUEST_BODY_COMPLETE: 758 case STATE_INIT_REQUEST_BODY_COMPLETE:
709 rv = DoInitRequestBodyComplete(rv); 759 rv = DoInitRequestBodyComplete(rv);
710 break; 760 break;
711 case STATE_BUILD_REQUEST: 761 case STATE_BUILD_REQUEST:
712 DCHECK_EQ(OK, rv); 762 DCHECK_EQ(OK, rv);
713 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST); 763 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 if (!ShouldApplyServerAuth()) 959 if (!ShouldApplyServerAuth())
910 return OK; 960 return OK;
911 return auth_controllers_[target]->MaybeGenerateAuthToken(request_, 961 return auth_controllers_[target]->MaybeGenerateAuthToken(request_,
912 io_callback_, 962 io_callback_,
913 net_log_); 963 net_log_);
914 } 964 }
915 965
916 int HttpNetworkTransaction::DoGenerateServerAuthTokenComplete(int rv) { 966 int HttpNetworkTransaction::DoGenerateServerAuthTokenComplete(int rv) {
917 DCHECK_NE(ERR_IO_PENDING, rv); 967 DCHECK_NE(ERR_IO_PENDING, rv);
918 if (rv == OK) 968 if (rv == OK)
919 next_state_ = STATE_INIT_REQUEST_BODY; 969 next_state_ = STATE_GET_TOKEN_BINDING_KEY;
920 return rv; 970 return rv;
921 } 971 }
922 972
923 void HttpNetworkTransaction::BuildRequestHeaders( 973 int HttpNetworkTransaction::DoGetTokenBindingKey() {
974 next_state_ = STATE_GET_TOKEN_BINDING_KEY_COMPLETE;
975 if (!IsTokenBindingEnabled())
976 return OK;
977
978 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_GET_TOKEN_BINDING_KEY);
979 ChannelIDService* channel_id_service = session_->params().channel_id_service;
980 return channel_id_service->GetOrCreateChannelID(
981 request_->url.host(), &token_binding_key_, io_callback_,
982 &token_binding_request_);
983 }
984
985 int HttpNetworkTransaction::DoGetTokenBindingKeyComplete(int rv) {
986 DCHECK_NE(ERR_IO_PENDING, rv);
987 next_state_ = STATE_INIT_REQUEST_BODY;
988 if (!IsTokenBindingEnabled())
989 return OK;
990
991 net_log_.EndEventWithNetErrorCode(
992 NetLog::TYPE_HTTP_TRANSACTION_GET_TOKEN_BINDING_KEY, rv);
993 return rv;
994 }
995
996 int HttpNetworkTransaction::BuildRequestHeaders(
924 bool using_http_proxy_without_tunnel) { 997 bool using_http_proxy_without_tunnel) {
925 request_headers_.SetHeader(HttpRequestHeaders::kHost, 998 request_headers_.SetHeader(HttpRequestHeaders::kHost,
926 GetHostAndOptionalPort(request_->url)); 999 GetHostAndOptionalPort(request_->url));
927 1000
928 // For compat with HTTP/1.0 servers and proxies: 1001 // For compat with HTTP/1.0 servers and proxies:
929 if (using_http_proxy_without_tunnel) { 1002 if (using_http_proxy_without_tunnel) {
930 request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection, 1003 request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection,
931 "keep-alive"); 1004 "keep-alive");
932 } else { 1005 } else {
933 request_headers_.SetHeader(HttpRequestHeaders::kConnection, "keep-alive"); 1006 request_headers_.SetHeader(HttpRequestHeaders::kConnection, "keep-alive");
(...skipping 12 matching lines...) Expand all
946 } else if (request_->method == "POST" || request_->method == "PUT") { 1019 } else if (request_->method == "POST" || request_->method == "PUT") {
947 // An empty POST/PUT request still needs a content length. As for HEAD, 1020 // 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 1021 // 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 1022 // 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. 1023 // 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 1024 // Firefox (40.0) does not send the header, and RFC 7230 & 7231
952 // specify that it should not be sent due to undefined behavior. 1025 // specify that it should not be sent due to undefined behavior.
953 request_headers_.SetHeader(HttpRequestHeaders::kContentLength, "0"); 1026 request_headers_.SetHeader(HttpRequestHeaders::kContentLength, "0");
954 } 1027 }
955 1028
1029 RecordTokenBindingSupport();
1030 if (token_binding_key_) {
1031 std::string token_binding_header;
1032 int rv = BuildTokenBindingHeader(&token_binding_header);
1033 if (rv != OK)
1034 return rv;
1035 request_headers_.SetHeader(HttpRequestHeaders::kTokenBinding,
1036 token_binding_header);
1037 }
1038
956 // Honor load flags that impact proxy caches. 1039 // Honor load flags that impact proxy caches.
957 if (request_->load_flags & LOAD_BYPASS_CACHE) { 1040 if (request_->load_flags & LOAD_BYPASS_CACHE) {
958 request_headers_.SetHeader(HttpRequestHeaders::kPragma, "no-cache"); 1041 request_headers_.SetHeader(HttpRequestHeaders::kPragma, "no-cache");
959 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "no-cache"); 1042 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "no-cache");
960 } else if (request_->load_flags & LOAD_VALIDATE_CACHE) { 1043 } else if (request_->load_flags & LOAD_VALIDATE_CACHE) {
961 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0"); 1044 request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0");
962 } 1045 }
963 1046
964 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) 1047 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY))
965 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( 1048 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader(
966 &request_headers_); 1049 &request_headers_);
967 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) 1050 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER))
968 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( 1051 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader(
969 &request_headers_); 1052 &request_headers_);
970 1053
971 request_headers_.MergeFrom(request_->extra_headers); 1054 request_headers_.MergeFrom(request_->extra_headers);
972 1055
973 if (using_http_proxy_without_tunnel && 1056 if (using_http_proxy_without_tunnel &&
974 !before_proxy_headers_sent_callback_.is_null()) 1057 !before_proxy_headers_sent_callback_.is_null())
975 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_); 1058 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_);
976 1059
977 response_.did_use_http_auth = 1060 response_.did_use_http_auth =
978 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || 1061 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) ||
979 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); 1062 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization);
1063 return OK;
1064 }
1065
1066 int HttpNetworkTransaction::BuildTokenBindingHeader(std::string* out) {
1067 std::vector<uint8_t> signed_ekm;
1068 int rv = stream_->GetSignedEKMForTokenBinding(token_binding_key_.get(),
1069 &signed_ekm);
1070 if (rv != OK)
1071 return rv;
1072 std::string provided_token_binding;
1073 rv = BuildProvidedTokenBinding(token_binding_key_.get(), signed_ekm,
1074 &provided_token_binding);
1075 if (rv != OK)
1076 return rv;
1077 std::vector<base::StringPiece> token_bindings;
1078 token_bindings.push_back(provided_token_binding);
1079 std::string header;
1080 rv = BuildTokenBindingMessageFromTokenBindings(token_bindings, &header);
1081 if (rv != OK)
1082 return rv;
1083 base::Base64UrlEncode(header, base::Base64UrlEncodePolicy::INCLUDE_PADDING,
1084 out);
1085 return OK;
980 } 1086 }
981 1087
982 int HttpNetworkTransaction::DoInitRequestBody() { 1088 int HttpNetworkTransaction::DoInitRequestBody() {
983 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; 1089 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE;
984 int rv = OK; 1090 int rv = OK;
985 if (request_->upload_data_stream) 1091 if (request_->upload_data_stream)
986 rv = request_->upload_data_stream->Init(io_callback_); 1092 rv = request_->upload_data_stream->Init(io_callback_);
987 return rv; 1093 return rv;
988 } 1094 }
989 1095
990 int HttpNetworkTransaction::DoInitRequestBodyComplete(int result) { 1096 int HttpNetworkTransaction::DoInitRequestBodyComplete(int result) {
991 if (result == OK) 1097 if (result == OK)
992 next_state_ = STATE_BUILD_REQUEST; 1098 next_state_ = STATE_BUILD_REQUEST;
993 return result; 1099 return result;
994 } 1100 }
995 1101
996 int HttpNetworkTransaction::DoBuildRequest() { 1102 int HttpNetworkTransaction::DoBuildRequest() {
997 next_state_ = STATE_BUILD_REQUEST_COMPLETE; 1103 next_state_ = STATE_BUILD_REQUEST_COMPLETE;
998 headers_valid_ = false; 1104 headers_valid_ = false;
999 1105
1000 // This is constructed lazily (instead of within our Start method), so that 1106 // This is constructed lazily (instead of within our Start method), so that
1001 // we have proxy info available. 1107 // we have proxy info available.
1002 if (request_headers_.IsEmpty()) { 1108 if (request_headers_.IsEmpty()) {
1003 bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel(); 1109 bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel();
1004 BuildRequestHeaders(using_http_proxy_without_tunnel); 1110 return BuildRequestHeaders(using_http_proxy_without_tunnel);
1005 } 1111 }
1006 1112
1007 return OK; 1113 return OK;
1008 } 1114 }
1009 1115
1010 int HttpNetworkTransaction::DoBuildRequestComplete(int result) { 1116 int HttpNetworkTransaction::DoBuildRequestComplete(int result) {
1011 if (result == OK) 1117 if (result == OK)
1012 next_state_ = STATE_SEND_REQUEST; 1118 next_state_ = STATE_SEND_REQUEST;
1013 return result; 1119 return result;
1014 } 1120 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 pending_auth_target_ = HttpAuth::AUTH_NONE; 1585 pending_auth_target_ = HttpAuth::AUTH_NONE;
1480 read_buf_ = NULL; 1586 read_buf_ = NULL;
1481 read_buf_len_ = 0; 1587 read_buf_len_ = 0;
1482 headers_valid_ = false; 1588 headers_valid_ = false;
1483 request_headers_.Clear(); 1589 request_headers_.Clear();
1484 response_ = HttpResponseInfo(); 1590 response_ = HttpResponseInfo();
1485 establishing_tunnel_ = false; 1591 establishing_tunnel_ = false;
1486 remote_endpoint_ = IPEndPoint(); 1592 remote_endpoint_ = IPEndPoint();
1487 net_error_details_.quic_broken = false; 1593 net_error_details_.quic_broken = false;
1488 net_error_details_.quic_connection_error = QUIC_NO_ERROR; 1594 net_error_details_.quic_connection_error = QUIC_NO_ERROR;
1595 token_binding_key_.reset();
1489 } 1596 }
1490 1597
1491 void HttpNetworkTransaction::CacheNetErrorDetailsAndResetStream() { 1598 void HttpNetworkTransaction::CacheNetErrorDetailsAndResetStream() {
1492 if (stream_) 1599 if (stream_)
1493 stream_->PopulateNetErrorDetails(&net_error_details_); 1600 stream_->PopulateNetErrorDetails(&net_error_details_);
1494 stream_.reset(); 1601 stream_.reset();
1495 } 1602 }
1496 1603
1497 void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) { 1604 void HttpNetworkTransaction::RecordSSLFallbackMetrics(int result) {
1498 if (result != OK && result != ERR_SSL_INAPPROPRIATE_FALLBACK) 1605 if (result != OK && result != ERR_SSL_INAPPROPRIATE_FALLBACK)
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 DCHECK(stream_request_); 1816 DCHECK(stream_request_);
1710 1817
1711 // Since the transaction can restart with auth credentials, it may create a 1818 // Since the transaction can restart with auth credentials, it may create a
1712 // stream more than once. Accumulate all of the connection attempts across 1819 // stream more than once. Accumulate all of the connection attempts across
1713 // those streams by appending them to the vector: 1820 // those streams by appending them to the vector:
1714 for (const auto& attempt : stream_request_->connection_attempts()) 1821 for (const auto& attempt : stream_request_->connection_attempts())
1715 connection_attempts_.push_back(attempt); 1822 connection_attempts_.push_back(attempt);
1716 } 1823 }
1717 1824
1718 } // namespace net 1825 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698