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" | |
18 #include "base/time/time.h" | 17 #include "base/time/time.h" |
19 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
20 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
21 #include "net/quic/quic_bandwidth.h" | 20 #include "net/quic/quic_bandwidth.h" |
22 #include "net/quic/quic_server_id.h" | 21 #include "net/quic/quic_server_id.h" |
23 #include "net/socket/next_proto.h" | 22 #include "net/socket/next_proto.h" |
24 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. | 23 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. |
25 #include "net/spdy/spdy_protocol.h" | 24 #include "net/spdy/spdy_protocol.h" |
26 #include "url/scheme_host_port.h" | 25 #include "url/scheme_host_port.h" |
27 | 26 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // * SPDY Settings (like CWND ID field). | 222 // * SPDY Settings (like CWND ID field). |
224 // * QUIC data (like ServerNetworkStats and QuicServerInfo). | 223 // * QUIC data (like ServerNetworkStats and QuicServerInfo). |
225 // | 224 // |
226 // Embedders must ensure that HttpServerProperites is completely initialized | 225 // Embedders must ensure that HttpServerProperites is completely initialized |
227 // before the first request is issued. | 226 // before the first request is issued. |
228 class NET_EXPORT HttpServerProperties { | 227 class NET_EXPORT HttpServerProperties { |
229 public: | 228 public: |
230 HttpServerProperties() {} | 229 HttpServerProperties() {} |
231 virtual ~HttpServerProperties() {} | 230 virtual ~HttpServerProperties() {} |
232 | 231 |
233 // Gets a weak pointer for this object. | |
234 virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() = 0; | |
235 | |
236 // Deletes all data. | 232 // Deletes all data. |
237 virtual void Clear() = 0; | 233 virtual void Clear() = 0; |
238 | 234 |
239 // Returns true if |server| supports a network protocol which honors | 235 // Returns true if |server| supports a network protocol which honors |
240 // request prioritization. | 236 // request prioritization. |
241 virtual bool SupportsRequestPriority(const url::SchemeHostPort& server) = 0; | 237 virtual bool SupportsRequestPriority(const url::SchemeHostPort& server) = 0; |
242 | 238 |
243 // Returns the value set by SetSupportsSpdy(). If not set, returns false. | 239 // Returns the value set by SetSupportsSpdy(). If not set, returns false. |
244 virtual bool GetSupportsSpdy(const url::SchemeHostPort& server) = 0; | 240 virtual bool GetSupportsSpdy(const url::SchemeHostPort& server) = 0; |
245 | 241 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 virtual void SetMaxServerConfigsStoredInProperties( | 367 virtual void SetMaxServerConfigsStoredInProperties( |
372 size_t max_server_configs_stored_in_properties) = 0; | 368 size_t max_server_configs_stored_in_properties) = 0; |
373 | 369 |
374 private: | 370 private: |
375 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 371 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
376 }; | 372 }; |
377 | 373 |
378 } // namespace net | 374 } // namespace net |
379 | 375 |
380 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 376 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
OLD | NEW |