| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <tuple> | 12 #include <tuple> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/containers/mru_cache.h" | 15 #include "base/containers/mru_cache.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "net/base/host_port_pair.h" | 19 #include "net/base/host_port_pair.h" |
| 20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
| 21 #include "net/quic/quic_bandwidth.h" | 21 #include "net/quic/quic_bandwidth.h" |
| 22 #include "net/quic/quic_server_id.h" | 22 #include "net/quic/quic_server_id.h" |
| 23 #include "net/socket/next_proto.h" | 23 #include "net/socket/next_proto.h" |
| 24 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. | 24 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. |
| 25 #include "net/spdy/spdy_protocol.h" | 25 #include "net/spdy/spdy_protocol.h" |
| 26 #include "url/scheme_host_port.h" |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class Value; | 29 class Value; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace net { | 32 namespace net { |
| 32 | 33 |
| 33 class IPAddress; | 34 class IPAddress; |
| 34 struct SSLConfig; | 35 struct SSLConfig; |
| 35 | 36 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 virtual ~HttpServerProperties() {} | 231 virtual ~HttpServerProperties() {} |
| 231 | 232 |
| 232 // Gets a weak pointer for this object. | 233 // Gets a weak pointer for this object. |
| 233 virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() = 0; | 234 virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() = 0; |
| 234 | 235 |
| 235 // Deletes all data. | 236 // Deletes all data. |
| 236 virtual void Clear() = 0; | 237 virtual void Clear() = 0; |
| 237 | 238 |
| 238 // Returns true if |server| supports a network protocol which honors | 239 // Returns true if |server| supports a network protocol which honors |
| 239 // request prioritization. | 240 // request prioritization. |
| 240 virtual bool SupportsRequestPriority(const HostPortPair& server) = 0; | 241 virtual bool SupportsRequestPriority(const url::SchemeHostPort& server) = 0; |
| 241 | 242 |
| 242 // Returns the value set by SetSupportsSpdy(). If not set, returns false. | 243 // Returns the value set by SetSupportsSpdy(). If not set, returns false. |
| 243 virtual bool GetSupportsSpdy(const HostPortPair& server) = 0; | 244 virtual bool GetSupportsSpdy(const url::SchemeHostPort& server) = 0; |
| 244 | 245 |
| 245 // Add |server| into the persistent store. Should only be called from IO | 246 // Add |server| into the persistent store. Should only be called from IO |
| 246 // thread. | 247 // thread. |
| 247 virtual void SetSupportsSpdy(const HostPortPair& server, | 248 virtual void SetSupportsSpdy(const url::SchemeHostPort& server, |
| 248 bool support_spdy) = 0; | 249 bool support_spdy) = 0; |
| 249 | 250 |
| 250 // Returns true if |server| has required HTTP/1.1 via HTTP/2 error code. | 251 // Returns true if |server| has required HTTP/1.1 via HTTP/2 error code. |
| 251 virtual bool RequiresHTTP11(const HostPortPair& server) = 0; | 252 virtual bool RequiresHTTP11(const HostPortPair& server) = 0; |
| 252 | 253 |
| 253 // Require HTTP/1.1 on subsequent connections. Not persisted. | 254 // Require HTTP/1.1 on subsequent connections. Not persisted. |
| 254 virtual void SetHTTP11Required(const HostPortPair& server) = 0; | 255 virtual void SetHTTP11Required(const HostPortPair& server) = 0; |
| 255 | 256 |
| 256 // Modify SSLConfig to force HTTP/1.1. | 257 // Modify SSLConfig to force HTTP/1.1. |
| 257 static void ForceHTTP11(SSLConfig* ssl_config); | 258 static void ForceHTTP11(SSLConfig* ssl_config); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 virtual void SetMaxServerConfigsStoredInProperties( | 374 virtual void SetMaxServerConfigsStoredInProperties( |
| 374 size_t max_server_configs_stored_in_properties) = 0; | 375 size_t max_server_configs_stored_in_properties) = 0; |
| 375 | 376 |
| 376 private: | 377 private: |
| 377 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 378 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 378 }; | 379 }; |
| 379 | 380 |
| 380 } // namespace net | 381 } // namespace net |
| 381 | 382 |
| 382 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 383 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |