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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 858323002: QUIC - Deleted disable_loading_server_info_for_new_servers field trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase with TOT 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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 globals.alternate_protocol_probability_threshold.CopyToIfSet( 1046 globals.alternate_protocol_probability_threshold.CopyToIfSet(
1047 &params->alternate_protocol_probability_threshold); 1047 &params->alternate_protocol_probability_threshold);
1048 1048
1049 globals.enable_quic.CopyToIfSet(&params->enable_quic); 1049 globals.enable_quic.CopyToIfSet(&params->enable_quic);
1050 globals.quic_always_require_handshake_confirmation.CopyToIfSet( 1050 globals.quic_always_require_handshake_confirmation.CopyToIfSet(
1051 &params->quic_always_require_handshake_confirmation); 1051 &params->quic_always_require_handshake_confirmation);
1052 globals.quic_disable_connection_pooling.CopyToIfSet( 1052 globals.quic_disable_connection_pooling.CopyToIfSet(
1053 &params->quic_disable_connection_pooling); 1053 &params->quic_disable_connection_pooling);
1054 globals.quic_load_server_info_timeout_ms.CopyToIfSet( 1054 globals.quic_load_server_info_timeout_ms.CopyToIfSet(
1055 &params->quic_load_server_info_timeout_ms); 1055 &params->quic_load_server_info_timeout_ms);
1056 globals.quic_disable_loading_server_info_for_new_servers.CopyToIfSet(
1057 &params->quic_disable_loading_server_info_for_new_servers);
1058 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet( 1056 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet(
1059 &params->quic_load_server_info_timeout_srtt_multiplier); 1057 &params->quic_load_server_info_timeout_srtt_multiplier);
1060 globals.quic_enable_truncated_connection_ids.CopyToIfSet( 1058 globals.quic_enable_truncated_connection_ids.CopyToIfSet(
1061 &params->quic_enable_truncated_connection_ids); 1059 &params->quic_enable_truncated_connection_ids);
1062 globals.enable_quic_port_selection.CopyToIfSet( 1060 globals.enable_quic_port_selection.CopyToIfSet(
1063 &params->enable_quic_port_selection); 1061 &params->enable_quic_port_selection);
1064 globals.quic_max_packet_length.CopyToIfSet(&params->quic_max_packet_length); 1062 globals.quic_max_packet_length.CopyToIfSet(&params->quic_max_packet_length);
1065 globals.quic_user_agent_id.CopyToIfSet(&params->quic_user_agent_id); 1063 globals.quic_user_agent_id.CopyToIfSet(&params->quic_user_agent_id);
1066 globals.quic_supported_versions.CopyToIfSet( 1064 globals.quic_supported_versions.CopyToIfSet(
1067 &params->quic_supported_versions); 1065 &params->quic_supported_versions);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 globals->quic_always_require_handshake_confirmation.set( 1208 globals->quic_always_require_handshake_confirmation.set(
1211 ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params)); 1209 ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params));
1212 globals->quic_disable_connection_pooling.set( 1210 globals->quic_disable_connection_pooling.set(
1213 ShouldQuicDisableConnectionPooling(quic_trial_params)); 1211 ShouldQuicDisableConnectionPooling(quic_trial_params));
1214 int load_server_info_timeout_ms = 1212 int load_server_info_timeout_ms =
1215 GetQuicLoadServerInfoTimeout(quic_trial_params); 1213 GetQuicLoadServerInfoTimeout(quic_trial_params);
1216 if (load_server_info_timeout_ms != 0) { 1214 if (load_server_info_timeout_ms != 0) {
1217 globals->quic_load_server_info_timeout_ms.set( 1215 globals->quic_load_server_info_timeout_ms.set(
1218 load_server_info_timeout_ms); 1216 load_server_info_timeout_ms);
1219 } 1217 }
1220 globals->quic_disable_loading_server_info_for_new_servers.set(
1221 ShouldDisableLoadingServerInfoForNewServers(quic_trial_params));
1222 float load_server_info_timeout_srtt_multiplier = 1218 float load_server_info_timeout_srtt_multiplier =
1223 GetQuicLoadServerInfoTimeoutSrttMultiplier(quic_trial_params); 1219 GetQuicLoadServerInfoTimeoutSrttMultiplier(quic_trial_params);
1224 globals->quic_enable_truncated_connection_ids.set( 1220 globals->quic_enable_truncated_connection_ids.set(
1225 ShouldQuicEnableTruncatedConnectionIds(quic_trial_params)); 1221 ShouldQuicEnableTruncatedConnectionIds(quic_trial_params));
1226 if (load_server_info_timeout_srtt_multiplier != 0) { 1222 if (load_server_info_timeout_srtt_multiplier != 0) {
1227 globals->quic_load_server_info_timeout_srtt_multiplier.set( 1223 globals->quic_load_server_info_timeout_srtt_multiplier.set(
1228 load_server_info_timeout_srtt_multiplier); 1224 load_server_info_timeout_srtt_multiplier);
1229 } 1225 }
1230 globals->enable_quic_port_selection.set( 1226 globals->enable_quic_port_selection.set(
1231 ShouldEnableQuicPortSelection(command_line)); 1227 ShouldEnableQuicPortSelection(command_line));
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 int value; 1374 int value;
1379 if (base::StringToInt(GetVariationParam(quic_trial_params, 1375 if (base::StringToInt(GetVariationParam(quic_trial_params,
1380 "load_server_info_timeout"), 1376 "load_server_info_timeout"),
1381 &value)) { 1377 &value)) {
1382 return value; 1378 return value;
1383 } 1379 }
1384 return 0; 1380 return 0;
1385 } 1381 }
1386 1382
1387 // static 1383 // static
1388 bool IOThread::ShouldDisableLoadingServerInfoForNewServers(
1389 const VariationParameters& quic_trial_params) {
1390 return LowerCaseEqualsASCII(
1391 GetVariationParam(quic_trial_params,
1392 "disable_loading_server_info_for_new_servers"),
1393 "true");
1394 }
1395
1396 // static
1397 float IOThread::GetQuicLoadServerInfoTimeoutSrttMultiplier( 1384 float IOThread::GetQuicLoadServerInfoTimeoutSrttMultiplier(
1398 const VariationParameters& quic_trial_params) { 1385 const VariationParameters& quic_trial_params) {
1399 double value; 1386 double value;
1400 if (base::StringToDouble(GetVariationParam(quic_trial_params, 1387 if (base::StringToDouble(GetVariationParam(quic_trial_params,
1401 "load_server_info_time_to_srtt"), 1388 "load_server_info_time_to_srtt"),
1402 &value)) { 1389 &value)) {
1403 return (float)value; 1390 return (float)value;
1404 } 1391 }
1405 return 0.0f; 1392 return 0.0f;
1406 } 1393 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1440 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1454 for (size_t i = 0; i < supported_versions.size(); ++i) { 1441 for (size_t i = 0; i < supported_versions.size(); ++i) {
1455 net::QuicVersion version = supported_versions[i]; 1442 net::QuicVersion version = supported_versions[i];
1456 if (net::QuicVersionToString(version) == quic_version) { 1443 if (net::QuicVersionToString(version) == quic_version) {
1457 return version; 1444 return version;
1458 } 1445 }
1459 } 1446 }
1460 1447
1461 return net::QUIC_VERSION_UNSUPPORTED; 1448 return net::QUIC_VERSION_UNSUPPORTED;
1462 } 1449 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698