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

Unified Diff: net/http/http_server_properties_impl.cc

Issue 605563003: QUIC - Code to persist if we had talked QUIC to a server and if so what (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/http/http_server_properties_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56f30621835bae7a14c608b315123b63db90de59..26575e60e605f5810c324e1ee044d22791ae066c 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/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) {
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/http/http_server_properties_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698