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_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <deque> | 11 #include <deque> |
12 #include <map> | 12 #include <map> |
13 #include <set> | 13 #include <set> |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/thread_checker.h" |
20 #include "base/time/default_tick_clock.h" | 20 #include "base/time/default_tick_clock.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "net/base/host_port_pair.h" | 22 #include "net/base/host_port_pair.h" |
23 #include "net/base/ip_address.h" | 23 #include "net/base/ip_address.h" |
24 #include "net/base/linked_hash_map.h" | 24 #include "net/base/linked_hash_map.h" |
25 #include "net/base/net_export.h" | 25 #include "net/base/net_export.h" |
26 #include "net/http/broken_alternative_services.h" | 26 #include "net/http/broken_alternative_services.h" |
27 #include "net/http/http_server_properties.h" | 27 #include "net/http/http_server_properties.h" |
28 | 28 |
29 namespace base { | 29 namespace base { |
30 class ListValue; | 30 class ListValue; |
31 } | 31 } |
32 | 32 |
33 namespace net { | 33 namespace net { |
34 | 34 |
35 // The implementation for setting/retrieving the HTTP server properties. | 35 // The implementation for setting/retrieving the HTTP server properties. |
36 class NET_EXPORT HttpServerPropertiesImpl | 36 class NET_EXPORT HttpServerPropertiesImpl |
37 : public HttpServerProperties, | 37 : public HttpServerProperties, |
38 public BrokenAlternativeServices::Delegate, | 38 public BrokenAlternativeServices::Delegate { |
39 NON_EXPORTED_BASE(public base::NonThreadSafe) { | |
40 public: | 39 public: |
41 HttpServerPropertiesImpl(); | 40 HttpServerPropertiesImpl(); |
42 explicit HttpServerPropertiesImpl( | 41 explicit HttpServerPropertiesImpl( |
43 base::TickClock* broken_alternative_services_clock); | 42 base::TickClock* broken_alternative_services_clock); |
44 ~HttpServerPropertiesImpl() override; | 43 ~HttpServerPropertiesImpl() override; |
45 | 44 |
46 // Sets |spdy_servers_map_| with the servers (host/port) from | 45 // Sets |spdy_servers_map_| with the servers (host/port) from |
47 // |spdy_servers| that either support SPDY or not. | 46 // |spdy_servers| that either support SPDY or not. |
48 void SetSpdyServers(std::vector<std::string>* spdy_servers, | 47 void SetSpdyServers(std::vector<std::string>* spdy_servers, |
49 bool support_spdy); | 48 bool support_spdy); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Map from a Canonical scheme/host/port (host is some postfix of host names) | 161 // Map from a Canonical scheme/host/port (host is some postfix of host names) |
163 // to an actual origin, which has a plausible alternate protocol mapping. | 162 // to an actual origin, which has a plausible alternate protocol mapping. |
164 CanonicalHostMap canonical_host_to_origin_map_; | 163 CanonicalHostMap canonical_host_to_origin_map_; |
165 // Contains list of suffixes (for exmaple ".c.youtube.com", | 164 // Contains list of suffixes (for exmaple ".c.youtube.com", |
166 // ".googlevideo.com", ".googleusercontent.com") of canonical hostnames. | 165 // ".googlevideo.com", ".googleusercontent.com") of canonical hostnames. |
167 CanonicalSufficList canonical_suffixes_; | 166 CanonicalSufficList canonical_suffixes_; |
168 | 167 |
169 QuicServerInfoMap quic_server_info_map_; | 168 QuicServerInfoMap quic_server_info_map_; |
170 size_t max_server_configs_stored_in_properties_; | 169 size_t max_server_configs_stored_in_properties_; |
171 | 170 |
| 171 THREAD_CHECKER(thread_checker_); |
| 172 |
172 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); | 173 DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesImpl); |
173 }; | 174 }; |
174 | 175 |
175 } // namespace net | 176 } // namespace net |
176 | 177 |
177 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ | 178 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_IMPL_H_ |
OLD | NEW |