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

Unified Diff: net/http/http_server_properties_impl.h

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.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
« no previous file with comments | « net/http/http_server_properties.cc ('k') | net/http/http_server_properties_impl.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.h
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h
index fc986890e7595059ba6afc28825ef5417b4eb94d..5ff6f48f2562a60d7b8eaa7909b42023b9c6a2a7 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -6,6 +6,7 @@
#define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -82,6 +83,16 @@ class NET_EXPORT HttpServerPropertiesImpl
// Add |server| into the persistent store.
void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
+ // Returns true if |server| has required HTTP/1.1 via HTTP/2 error code.
+ bool RequiresHTTP11(const HostPortPair& server) override;
+
+ // Require HTTP/1.1 on subsequent connections. Not persisted.
+ void SetHTTP11Required(const HostPortPair& server) override;
+
+ // Modify SSLConfig to force HTTP/1.1 if necessary.
+ void MaybeForceHTTP11(const HostPortPair& server,
+ SSLConfig* ssl_config) override;
+
// Returns true if |server| has an Alternate-Protocol header.
bool HasAlternateProtocol(const HostPortPair& server) override;
@@ -159,6 +170,7 @@ class NET_EXPORT HttpServerPropertiesImpl
typedef base::MRUCache<std::string, bool> SpdyServerHostPortMap;
typedef std::map<HostPortPair, HostPortPair> CanonicalHostMap;
typedef std::vector<std::string> CanonicalSufficList;
+ typedef std::set<HostPortPair> Http11ServerHostPortSet;
// List of broken host:ports and the times when they can be expired.
struct BrokenAlternateProtocolEntry {
HostPortPair server;
@@ -178,6 +190,7 @@ class NET_EXPORT HttpServerPropertiesImpl
void ScheduleBrokenAlternateProtocolMappingsExpiration();
SpdyServerHostPortMap spdy_servers_map_;
+ Http11ServerHostPortSet http11_servers_;
AlternateProtocolMap alternate_protocol_map_;
BrokenAlternateProtocolList broken_alternate_protocol_list_;
« no previous file with comments | « net/http/http_server_properties.cc ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698