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

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 supported_versions_); 1040 supported_versions_);
1041 connection->set_max_packet_length(max_packet_length_); 1041 connection->set_max_packet_length(max_packet_length_);
1042 1042
1043 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 1043 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1044 tracked_objects::ScopedTracker tracking_profile5( 1044 tracked_objects::ScopedTracker tracking_profile5(
1045 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1045 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1046 "422516 QuicStreamFactory::CreateSession5")); 1046 "422516 QuicStreamFactory::CreateSession5"));
1047 1047
1048 InitializeCachedStateInCryptoConfig(server_id, server_info); 1048 InitializeCachedStateInCryptoConfig(server_id, server_info);
1049 1049
1050 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1051 tracked_objects::ScopedTracker tracking_profile51(
1052 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1053 "422516 QuicStreamFactory::CreateSession51"));
1054
1050 QuicConfig config = config_; 1055 QuicConfig config = config_;
1056
1057 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1058 tracked_objects::ScopedTracker tracking_profile52(
1059 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1060 "422516 QuicStreamFactory::CreateSession52"));
1061
1051 config.set_max_undecryptable_packets(kMaxUndecryptablePackets); 1062 config.set_max_undecryptable_packets(kMaxUndecryptablePackets);
1063
1064 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1065 tracked_objects::ScopedTracker tracking_profile53(
1066 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1067 "422516 QuicStreamFactory::CreateSession53"));
1068
1052 config.SetInitialStreamFlowControlWindowToSend(kInitialReceiveWindowSize); 1069 config.SetInitialStreamFlowControlWindowToSend(kInitialReceiveWindowSize);
1070
1071 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1072 tracked_objects::ScopedTracker tracking_profile54(
1073 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1074 "422516 QuicStreamFactory::CreateSession54"));
1075
1053 config.SetInitialSessionFlowControlWindowToSend(kInitialReceiveWindowSize); 1076 config.SetInitialSessionFlowControlWindowToSend(kInitialReceiveWindowSize);
1077
1078 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1079 tracked_objects::ScopedTracker tracking_profile55(
1080 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1081 "422516 QuicStreamFactory::CreateSession55"));
1082
1054 int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id); 1083 int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id);
1084
1085 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1086 tracked_objects::ScopedTracker tracking_profile56(
1087 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1088 "422516 QuicStreamFactory::CreateSession56"));
1089
1055 if (srtt > 0) 1090 if (srtt > 0)
1056 config.SetInitialRoundTripTimeUsToSend(static_cast<uint32>(srtt)); 1091 config.SetInitialRoundTripTimeUsToSend(static_cast<uint32>(srtt));
1092
1093 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1094 tracked_objects::ScopedTracker tracking_profile57(
1095 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1096 "422516 QuicStreamFactory::CreateSession57"));
1097
1057 if (enable_truncated_connection_ids_) 1098 if (enable_truncated_connection_ids_)
1058 config.SetBytesForConnectionIdToSend(0); 1099 config.SetBytesForConnectionIdToSend(0);
1059 1100
1060 if (quic_server_info_factory_ && !server_info) { 1101 if (quic_server_info_factory_ && !server_info) {
1061 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 1102 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1062 tracked_objects::ScopedTracker tracking_profile6( 1103 tracked_objects::ScopedTracker tracking_profile6(
1063 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1104 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1064 "422516 QuicStreamFactory::CreateSession6")); 1105 "422516 QuicStreamFactory::CreateSession6"));
1065 1106
1066 // Start the disk cache loading so that we can persist the newer QUIC server 1107 // Start the disk cache loading so that we can persist the newer QUIC server
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 if (!server_info) 1180 if (!server_info)
1140 return; 1181 return;
1141 1182
1142 QuicCryptoClientConfig::CachedState* cached = 1183 QuicCryptoClientConfig::CachedState* cached =
1143 crypto_config_.LookupOrCreate(server_id); 1184 crypto_config_.LookupOrCreate(server_id);
1144 if (!cached->IsEmpty()) 1185 if (!cached->IsEmpty())
1145 return; 1186 return;
1146 1187
1147 if (http_server_properties_) { 1188 if (http_server_properties_) {
1148 if (quic_supported_servers_at_startup_.empty()) { 1189 if (quic_supported_servers_at_startup_.empty()) {
1149 for (const std::pair<net::HostPortPair, net::AlternateProtocolInfo>& 1190 for (const std::pair<const net::HostPortPair, net::AlternateProtocolInfo>&
1150 key_value : http_server_properties_->alternate_protocol_map()) { 1191 key_value : http_server_properties_->alternate_protocol_map()) {
1151 if (key_value.second.protocol == QUIC) { 1192 if (key_value.second.protocol == QUIC) {
1152 quic_supported_servers_at_startup_.insert(key_value.first); 1193 quic_supported_servers_at_startup_.insert(key_value.first);
1153 } 1194 }
1154 } 1195 }
1155 } 1196 }
1156 1197
1157 // TODO(rtenneti): Delete the following histogram after collecting stats. 1198 // TODO(rtenneti): Delete the following histogram after collecting stats.
1158 // If the AlternateProtocolMap contained an entry for this host, check if 1199 // If the AlternateProtocolMap contained an entry for this host, check if
1159 // the disk cache contained an entry for it. 1200 // the disk cache contained an entry for it.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 http_server_properties_->ClearAlternateProtocol(server); 1273 http_server_properties_->ClearAlternateProtocol(server);
1233 http_server_properties_->SetAlternateProtocol( 1274 http_server_properties_->SetAlternateProtocol(
1234 server, alternate.port, alternate.protocol, 1); 1275 server, alternate.port, alternate.protocol, 1);
1235 DCHECK_EQ(QUIC, 1276 DCHECK_EQ(QUIC,
1236 http_server_properties_->GetAlternateProtocol(server).protocol); 1277 http_server_properties_->GetAlternateProtocol(server).protocol);
1237 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( 1278 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken(
1238 server)); 1279 server));
1239 } 1280 }
1240 1281
1241 } // namespace net 1282 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698