| Index: net/http/http_server_properties_impl.cc
|
| diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
|
| index 0b6b9743626b0e0bcf273e4875d347118961e0ed..a18a3fedb5603bed8e8ece5cb012624f9b6c1f8b 100644
|
| --- a/net/http/http_server_properties_impl.cc
|
| +++ b/net/http/http_server_properties_impl.cc
|
| @@ -102,12 +102,9 @@ void HttpServerPropertiesImpl::InitializeSpdySettingsServers(
|
| }
|
|
|
| void HttpServerPropertiesImpl::InitializeSupportsQuic(
|
| - SupportsQuicMap* supports_quic_map) {
|
| - for (SupportsQuicMap::reverse_iterator it = supports_quic_map->rbegin();
|
| - it != supports_quic_map->rend();
|
| - ++it) {
|
| - supports_quic_map_.insert(std::make_pair(it->first, it->second));
|
| - }
|
| + IPAddressNumber* last_address) {
|
| + if (last_address)
|
| + last_quic_address_ = *last_address;
|
| }
|
|
|
| void HttpServerPropertiesImpl::InitializeServerNetworkStats(
|
| @@ -164,7 +161,7 @@ void HttpServerPropertiesImpl::Clear() {
|
| alternate_protocol_map_.Clear();
|
| canonical_host_to_origin_map_.clear();
|
| spdy_settings_map_.Clear();
|
| - supports_quic_map_.clear();
|
| + last_quic_address_.clear();
|
| server_network_stats_map_.Clear();
|
| }
|
|
|
| @@ -411,26 +408,22 @@ HttpServerPropertiesImpl::spdy_settings_map() const {
|
| return spdy_settings_map_;
|
| }
|
|
|
| -SupportsQuic HttpServerPropertiesImpl::GetSupportsQuic(
|
| - const HostPortPair& host_port_pair) const {
|
| - SupportsQuicMap::const_iterator it = supports_quic_map_.find(host_port_pair);
|
| - if (it == supports_quic_map_.end()) {
|
| - CR_DEFINE_STATIC_LOCAL(SupportsQuic, kEmptySupportsQuic, ());
|
| - return kEmptySupportsQuic;
|
| - }
|
| - return it->second;
|
| -}
|
| +bool HttpServerPropertiesImpl::GetSupportsQuic(
|
| + IPAddressNumber* last_address) const {
|
| + if (last_quic_address_.empty())
|
| + return false;
|
|
|
| -void HttpServerPropertiesImpl::SetSupportsQuic(
|
| - const HostPortPair& host_port_pair,
|
| - bool used_quic,
|
| - const std::string& address) {
|
| - SupportsQuic supports_quic(used_quic, address);
|
| - supports_quic_map_.insert(std::make_pair(host_port_pair, supports_quic));
|
| + *last_address = last_quic_address_;
|
| + return true;
|
| }
|
|
|
| -const SupportsQuicMap& HttpServerPropertiesImpl::supports_quic_map() const {
|
| - return supports_quic_map_;
|
| +void HttpServerPropertiesImpl::SetSupportsQuic(bool used_quic,
|
| + const IPAddressNumber& address) {
|
| + if (!used_quic) {
|
| + last_quic_address_.clear();
|
| + } else {
|
| + last_quic_address_ = address;
|
| + }
|
| }
|
|
|
| void HttpServerPropertiesImpl::SetServerNetworkStats(
|
|
|