Chromium Code Reviews| Index: net/http/http_server_properties_manager.cc |
| diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc |
| index 08e4f6a5c00c18dad65e695ba26ca3efb7eebaaa..7bf33256983766d1adf59a83399044f78a56a58d 100644 |
| --- a/net/http/http_server_properties_manager.cc |
| +++ b/net/http/http_server_properties_manager.cc |
| @@ -7,7 +7,6 @@ |
| #include "base/bind.h" |
| #include "base/metrics/histogram.h" |
| #include "base/prefs/pref_service.h" |
| -#include "base/rand_util.h" |
| #include "base/single_thread_task_runner.h" |
| #include "base/stl_util.h" |
| #include "base/strings/string_number_conversions.h" |
| @@ -44,9 +43,6 @@ const int kVersionNumber = 3; |
| typedef std::vector<std::string> StringVector; |
| -// Load either 200 or 1000 servers based on a coin flip. |
| -const int k200AlternateProtocolHostsToLoad = 200; |
| -const int k1000AlternateProtocolHostsToLoad = 1000; |
| // Persist 1000 MRU AlternateProtocolHostPortPairs. |
| const int kMaxAlternateProtocolHostsToPersist = 1000; |
|
ramant (doing other things)
2014/10/23 21:02:52
rch and jar: we could reduce it to 200 (which coul
jar (doing other things)
2014/10/23 21:38:43
Sounds like a good proposal.
You could also look
ramant (doing other things)
2014/10/23 22:53:56
Changed the default value to 200.
Done.
|
| @@ -213,12 +209,6 @@ HttpServerPropertiesManager::alternate_protocol_map() const { |
| return http_server_properties_impl_->alternate_protocol_map(); |
| } |
| -void HttpServerPropertiesManager::SetAlternateProtocolExperiment( |
| - AlternateProtocolExperiment experiment) { |
| - DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| - http_server_properties_impl_->SetAlternateProtocolExperiment(experiment); |
| -} |
| - |
| void HttpServerPropertiesManager::SetAlternateProtocolProbabilityThreshold( |
| double threshold) { |
| DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| @@ -226,12 +216,6 @@ void HttpServerPropertiesManager::SetAlternateProtocolProbabilityThreshold( |
| threshold); |
| } |
| -AlternateProtocolExperiment |
| -HttpServerPropertiesManager::GetAlternateProtocolExperiment() const { |
| - DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| - return http_server_properties_impl_->GetAlternateProtocolExperiment(); |
| -} |
| - |
| const SettingsMap& HttpServerPropertiesManager::GetSpdySettings( |
| const HostPortPair& host_port_pair) { |
| DCHECK(network_task_runner_->RunsTasksOnCurrentThread()); |
| @@ -363,22 +347,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnPrefThread() { |
| new net::AlternateProtocolMap(kMaxAlternateProtocolHostsToPersist)); |
| scoped_ptr<net::SupportsQuicMap> supports_quic_map( |
| new net::SupportsQuicMap()); |
| - // TODO(rtenneti): Delete the following code after the experiment. |
| - int alternate_protocols_to_load = k200AlternateProtocolHostsToLoad; |
| - net::AlternateProtocolExperiment alternate_protocol_experiment = |
| - net::ALTERNATE_PROTOCOL_NOT_PART_OF_EXPERIMENT; |
| - if (version == kVersionNumber) { |
| - if (base::RandInt(0, 99) == 0) { |
| - alternate_protocol_experiment = |
| - net::ALTERNATE_PROTOCOL_TRUNCATED_200_SERVERS; |
| - } else { |
| - alternate_protocols_to_load = k1000AlternateProtocolHostsToLoad; |
| - alternate_protocol_experiment = |
| - net::ALTERNATE_PROTOCOL_TRUNCATED_1000_SERVERS; |
| - } |
| - DVLOG(1) << "# of servers that support alternate_protocol: " |
| - << alternate_protocols_to_load; |
| - } |
| int count = 0; |
| for (base::DictionaryValue::Iterator it(*servers_dict); !it.IsAtEnd(); |
| @@ -445,7 +413,7 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnPrefThread() { |
| continue; |
| } |
| - if (count >= alternate_protocols_to_load) |
| + if (count >= kMaxAlternateProtocolHostsToPersist) |
| continue; |
| do { |
| int port = 0; |
| @@ -522,7 +490,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnPrefThread() { |
| base::Owned(spdy_servers.release()), |
| base::Owned(spdy_settings_map.release()), |
| base::Owned(alternate_protocol_map.release()), |
| - alternate_protocol_experiment, |
| base::Owned(supports_quic_map.release()), |
| detected_corrupted_prefs)); |
| } |
| @@ -531,7 +498,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnNetworkThread( |
| StringVector* spdy_servers, |
| net::SpdySettingsMap* spdy_settings_map, |
| net::AlternateProtocolMap* alternate_protocol_map, |
| - net::AlternateProtocolExperiment alternate_protocol_experiment, |
| net::SupportsQuicMap* supports_quic_map, |
| bool detected_corrupted_prefs) { |
| // Preferences have the master data because admins might have pushed new |
| @@ -552,8 +518,6 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnNetworkThread( |
| alternate_protocol_map->size()); |
| http_server_properties_impl_->InitializeAlternateProtocolServers( |
| alternate_protocol_map); |
| - http_server_properties_impl_->SetAlternateProtocolExperiment( |
| - alternate_protocol_experiment); |
| http_server_properties_impl_->InitializeSupportsQuic(supports_quic_map); |