X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnet%2Fhttp%2Fhttp_server_properties_impl.cc;h=26575e60e605f5810c324e1ee044d22791ae066c;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=56f30621835bae7a14c608b315123b63db90de59;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/net/http/http_server_properties_impl.cc b/src/net/http/http_server_properties_impl.cc index 56f3062..26575e6 100644 --- a/src/net/http/http_server_properties_impl.cc +++ b/src/net/http/http_server_properties_impl.cc @@ -103,6 +103,15 @@ 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)); + } +} + void HttpServerPropertiesImpl::GetSpdyServerList( base::ListValue* spdy_server_list, size_t max_size) const { @@ -158,6 +167,7 @@ void HttpServerPropertiesImpl::Clear() { alternate_protocol_map_.Clear(); canonical_host_to_origin_map_.clear(); spdy_settings_map_.Clear(); + supports_quic_map_.clear(); } bool HttpServerPropertiesImpl::SupportsSpdy( @@ -406,6 +416,29 @@ 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; +} + +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)); +} + +const SupportsQuicMap& +HttpServerPropertiesImpl::supports_quic_map() const { + return supports_quic_map_; +} + void HttpServerPropertiesImpl::SetServerNetworkStats( const HostPortPair& host_port_pair, NetworkStats stats) {