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

Unified Diff: net/http/http_server_properties_manager.h

Issue 892203004: Make HttpServerProperties::GetSupportsQuic not host-specific. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: net/http/http_server_properties_manager.h
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h
index 56679cb96e2b18f865826eca68f1466e22088828..0293d3cefcac0f8e32f55ed1aa5ffc33e745f2c0 100644
--- a/net/http/http_server_properties_manager.h
+++ b/net/http/http_server_properties_manager.h
@@ -108,12 +108,9 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
void ClearSpdySettings(const HostPortPair& host_port_pair) override;
void ClearAllSpdySettings() override;
const SpdySettingsMap& spdy_settings_map() const override;
- SupportsQuic GetSupportsQuic(
- const HostPortPair& host_port_pair) const override;
- void SetSupportsQuic(const HostPortPair& host_port_pair,
- bool used_quic,
- const std::string& address) override;
- const SupportsQuicMap& supports_quic_map() const override;
+ bool GetSupportsQuic(IPAddressNumber* last_address) const override;
+ void SetSupportsQuic(bool used_quic,
+ const IPAddressNumber& last_address) override;
void SetServerNetworkStats(const HostPortPair& host_port_pair,
ServerNetworkStats stats) override;
const ServerNetworkStats* GetServerNetworkStats(
@@ -145,7 +142,7 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
std::vector<std::string>* spdy_servers,
SpdySettingsMap* spdy_settings_map,
AlternateProtocolMap* alternate_protocol_map,
- SupportsQuicMap* supports_quic_map,
+ IPAddressNumber* last_quic_address,
ServerNetworkStatsMap* server_network_stats_map,
bool detected_corrupted_prefs);
@@ -174,22 +171,21 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
void UpdatePrefsOnPrefThread(base::ListValue* spdy_server_list,
SpdySettingsMap* spdy_settings_map,
AlternateProtocolMap* alternate_protocol_map,
- SupportsQuicMap* supports_quic_map,
+ IPAddressNumber* last_quic_address,
ServerNetworkStatsMap* server_network_stats_map,
const base::Closure& completion);
private:
void OnHttpServerPropertiesChanged();
+ bool ReadSupportsQuic(const base::DictionaryValue& server_dict,
+ IPAddressNumber* last_quic_address);
void AddToSpdySettingsMap(const HostPortPair& server,
const base::DictionaryValue& server_dict,
SpdySettingsMap* spdy_settings_map);
bool AddToAlternateProtocolMap(const HostPortPair& server,
const base::DictionaryValue& server_dict,
AlternateProtocolMap* alternate_protocol_map);
- bool AddToSupportsQuicMap(const HostPortPair& server,
- const base::DictionaryValue& server_dict,
- SupportsQuicMap* supports_quic_map);
bool AddToNetworkStatsMap(const HostPortPair& server,
const base::DictionaryValue& server_dict,
ServerNetworkStatsMap* network_stats_map);
@@ -199,12 +195,14 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
void SaveAlternateProtocolToServerPrefs(
const AlternateProtocolInfo* port_alternate_protocol,
base::DictionaryValue* server_pref_dict);
- void SaveSupportsQuicToServerPrefs(const SupportsQuic* supports_quic,
- base::DictionaryValue* server_pref_dict);
void SaveNetworkStatsToServerPrefs(
const ServerNetworkStats* server_network_stats,
base::DictionaryValue* server_pref_dict);
+ void SaveSupportsQuicToPrefs(
+ const IPAddressNumber* last_quic_address,
+ base::DictionaryValue* http_server_properties_dict);
+
// -----------
// Pref thread
// -----------

Powered by Google App Engine
This is Rietveld 408576698