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

Unified Diff: net/http/http_server_properties.h

Issue 1904483004: Change SupportsSpdy dict, SpdySettingsMap, ServerNetworkStatsMap, AlternativeServiceMap and disk da… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile after sync code, introduced by commit 388755 Created 4 years, 8 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_network_transaction_unittest.cc ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 9e022fa54b84b451847be055a7308b2f5906dc07..fb8aaa405c24fa59697ef0115ef2e5c31ad08e70 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -23,6 +23,7 @@
#include "net/socket/next_proto.h"
#include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this.
#include "net/spdy/spdy_protocol.h"
+#include "url/scheme_host_port.h"
namespace base {
class Value;
@@ -203,10 +204,11 @@ struct NET_EXPORT ServerNetworkStats {
typedef std::vector<AlternativeService> AlternativeServiceVector;
typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector;
-typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector>
+typedef base::MRUCache<url::SchemeHostPort, AlternativeServiceInfoVector>
AlternativeServiceMap;
-typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap;
-typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap;
+typedef base::MRUCache<url::SchemeHostPort, SettingsMap> SpdySettingsMap;
+typedef base::MRUCache<url::SchemeHostPort, ServerNetworkStats>
+ ServerNetworkStatsMap;
typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap;
// Persist 5 QUIC Servers. This is mainly used by cronet.
@@ -237,14 +239,14 @@ class NET_EXPORT HttpServerProperties {
// Returns true if |server| supports a network protocol which honors
// request prioritization.
- virtual bool SupportsRequestPriority(const HostPortPair& server) = 0;
+ virtual bool SupportsRequestPriority(const url::SchemeHostPort& server) = 0;
// Returns the value set by SetSupportsSpdy(). If not set, returns false.
- virtual bool GetSupportsSpdy(const HostPortPair& server) = 0;
+ virtual bool GetSupportsSpdy(const url::SchemeHostPort& server) = 0;
// Add |server| into the persistent store. Should only be called from IO
// thread.
- virtual void SetSupportsSpdy(const HostPortPair& server,
+ virtual void SetSupportsSpdy(const url::SchemeHostPort& server,
bool support_spdy) = 0;
// Returns true if |server| has required HTTP/1.1 via HTTP/2 error code.
@@ -263,14 +265,14 @@ class NET_EXPORT HttpServerProperties {
// Return all alternative services for |origin|, including broken ones.
// Returned alternative services never have empty hostnames.
virtual AlternativeServiceVector GetAlternativeServices(
- const HostPortPair& origin) = 0;
+ const url::SchemeHostPort& origin) = 0;
// Set a single alternative service for |origin|. Previous alternative
// services for |origin| are discarded.
// |alternative_service.host| may be empty.
// Return true if |alternative_service_map_| is changed.
virtual bool SetAlternativeService(
- const HostPortPair& origin,
+ const url::SchemeHostPort& origin,
const AlternativeService& alternative_service,
base::Time expiration) = 0;
@@ -279,7 +281,7 @@ class NET_EXPORT HttpServerProperties {
// Hostnames in |alternative_service_info_vector| may be empty.
// Return true if |alternative_service_map_| is changed.
virtual bool SetAlternativeServices(
- const HostPortPair& origin,
+ const url::SchemeHostPort& origin,
const AlternativeServiceInfoVector& alternative_service_info_vector) = 0;
// Marks |alternative_service| as broken.
@@ -308,7 +310,7 @@ class NET_EXPORT HttpServerProperties {
const AlternativeService& alternative_service) = 0;
// Clear all alternative services for |origin|.
- virtual void ClearAlternativeServices(const HostPortPair& origin) = 0;
+ virtual void ClearAlternativeServices(const url::SchemeHostPort& origin) = 0;
// Returns all alternative service mappings.
// Returned alternative services may have empty hostnames.
@@ -322,17 +324,17 @@ class NET_EXPORT HttpServerProperties {
// Gets a reference to the SettingsMap stored for a host.
// If no settings are stored, returns an empty SettingsMap.
virtual const SettingsMap& GetSpdySettings(
- const HostPortPair& host_port_pair) = 0;
+ const url::SchemeHostPort& server) = 0;
// Saves an individual SPDY setting for a host. Returns true if SPDY setting
// is to be persisted.
- virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
+ virtual bool SetSpdySetting(const url::SchemeHostPort& server,
SpdySettingsIds id,
SpdySettingsFlags flags,
uint32_t value) = 0;
// Clears all SPDY settings for a host.
- virtual void ClearSpdySettings(const HostPortPair& host_port_pair) = 0;
+ virtual void ClearSpdySettings(const url::SchemeHostPort& server) = 0;
// Clears all SPDY settings for all hosts.
virtual void ClearAllSpdySettings() = 0;
@@ -346,11 +348,11 @@ class NET_EXPORT HttpServerProperties {
const IPAddress& last_address) = 0;
// Sets |stats| for |host_port_pair|.
- virtual void SetServerNetworkStats(const HostPortPair& host_port_pair,
+ virtual void SetServerNetworkStats(const url::SchemeHostPort& server,
ServerNetworkStats stats) = 0;
virtual const ServerNetworkStats* GetServerNetworkStats(
- const HostPortPair& host_port_pair) = 0;
+ const url::SchemeHostPort& server) = 0;
virtual const ServerNetworkStatsMap& server_network_stats_map() const = 0;
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698