OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void Clear() override; | 85 void Clear() override; |
86 | 86 |
87 // Returns true if |server| supports SPDY. Should only be called from IO | 87 // Returns true if |server| supports SPDY. Should only be called from IO |
88 // thread. | 88 // thread. |
89 bool SupportsSpdy(const HostPortPair& server) override; | 89 bool SupportsSpdy(const HostPortPair& server) override; |
90 | 90 |
91 // Add |server| as the SPDY server which supports SPDY protocol into the | 91 // Add |server| as the SPDY server which supports SPDY protocol into the |
92 // persisitent store. Should only be called from IO thread. | 92 // persisitent store. Should only be called from IO thread. |
93 void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override; | 93 void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override; |
94 | 94 |
| 95 // Returns true if |server| has required HTTP/1.1 via HTTP/2 error code. |
| 96 bool RequiresHTTP11(const HostPortPair& server) override; |
| 97 |
| 98 // Require HTTP/1.1 on subsequent connections. Not persisted. |
| 99 void SetHTTP11Required(const HostPortPair& server) override; |
| 100 |
| 101 // Modify SSLConfig to force HTTP/1.1 if necessary. |
| 102 void MaybeForceHTTP11(const HostPortPair& server, |
| 103 SSLConfig* ssl_config) override; |
| 104 |
95 // Returns true if |server| has an Alternate-Protocol header. | 105 // Returns true if |server| has an Alternate-Protocol header. |
96 bool HasAlternateProtocol(const HostPortPair& server) override; | 106 bool HasAlternateProtocol(const HostPortPair& server) override; |
97 | 107 |
98 // Returns the Alternate-Protocol and port for |server|. | 108 // Returns the Alternate-Protocol and port for |server|. |
99 // HasAlternateProtocol(server) must be true. | 109 // HasAlternateProtocol(server) must be true. |
100 AlternateProtocolInfo GetAlternateProtocol( | 110 AlternateProtocolInfo GetAlternateProtocol( |
101 const HostPortPair& server) override; | 111 const HostPortPair& server) override; |
102 | 112 |
103 // Sets the Alternate-Protocol for |server|. | 113 // Sets the Alternate-Protocol for |server|. |
104 void SetAlternateProtocol(const HostPortPair& server, | 114 void SetAlternateProtocol(const HostPortPair& server, |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // Used to get |weak_ptr_| to self on the network thread. | 270 // Used to get |weak_ptr_| to self on the network thread. |
261 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > | 271 scoped_ptr<base::WeakPtrFactory<HttpServerPropertiesManager> > |
262 network_weak_ptr_factory_; | 272 network_weak_ptr_factory_; |
263 | 273 |
264 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); | 274 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManager); |
265 }; | 275 }; |
266 | 276 |
267 } // namespace net | 277 } // namespace net |
268 | 278 |
269 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ | 279 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_MANAGER_H_ |
OLD | NEW |