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_SSL_SSL_CONFIG_SERVICE_H_ | 5 #ifndef NET_SSL_SSL_CONFIG_SERVICE_H_ |
6 #define NET_SSL_SSL_CONFIG_SERVICE_H_ | 6 #define NET_SSL_SSL_CONFIG_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
13 #include "net/cert/crl_set.h" | 13 #include "net/cert/crl_set.h" |
14 #include "net/cert/ct_ev_whitelist.h" | 14 #include "net/cert/ct_ev_whitelist.h" |
15 #include "net/ssl/ssl_config.h" | 15 #include "net/ssl/ssl_config.h" |
16 | 16 |
| 17 class GURL; |
| 18 |
17 namespace net { | 19 namespace net { |
18 | 20 |
19 // The interface for retrieving the SSL configuration. This interface | 21 // The interface for retrieving the SSL configuration. This interface |
20 // does not cover setting the SSL configuration, as on some systems, the | 22 // does not cover setting the SSL configuration, as on some systems, the |
21 // SSLConfigService objects may not have direct access to the configuration, or | 23 // SSLConfigService objects may not have direct access to the configuration, or |
22 // live longer than the configuration preferences. | 24 // live longer than the configuration preferences. |
23 class NET_EXPORT SSLConfigService | 25 class NET_EXPORT SSLConfigService |
24 : public base::RefCountedThreadSafe<SSLConfigService> { | 26 : public base::RefCountedThreadSafe<SSLConfigService> { |
25 public: | 27 public: |
26 // Observer is notified when SSL config settings have changed. | 28 // Observer is notified when SSL config settings have changed. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Add an observer of this service. | 61 // Add an observer of this service. |
60 void AddObserver(Observer* observer); | 62 void AddObserver(Observer* observer); |
61 | 63 |
62 // Remove an observer of this service. | 64 // Remove an observer of this service. |
63 void RemoveObserver(Observer* observer); | 65 void RemoveObserver(Observer* observer); |
64 | 66 |
65 // Calls the OnSSLConfigChanged method of registered observers. Should only be | 67 // Calls the OnSSLConfigChanged method of registered observers. Should only be |
66 // called on the IO thread. | 68 // called on the IO thread. |
67 void NotifySSLConfigChange(); | 69 void NotifySSLConfigChange(); |
68 | 70 |
| 71 // Returns true if the |url| should use fastradio padding. |
| 72 virtual bool SupportsFastradioPadding(const GURL& url); |
| 73 |
69 protected: | 74 protected: |
70 friend class base::RefCountedThreadSafe<SSLConfigService>; | 75 friend class base::RefCountedThreadSafe<SSLConfigService>; |
71 | 76 |
72 virtual ~SSLConfigService(); | 77 virtual ~SSLConfigService(); |
73 | 78 |
74 // Process before/after config update. | 79 // Process before/after config update. |
75 void ProcessConfigUpdate(const SSLConfig& orig_config, | 80 void ProcessConfigUpdate(const SSLConfig& orig_config, |
76 const SSLConfig& new_config); | 81 const SSLConfig& new_config); |
77 | 82 |
78 private: | 83 private: |
79 ObserverList<Observer> observer_list_; | 84 ObserverList<Observer> observer_list_; |
80 }; | 85 }; |
81 | 86 |
82 } // namespace net | 87 } // namespace net |
83 | 88 |
84 #endif // NET_SSL_SSL_CONFIG_SERVICE_H_ | 89 #endif // NET_SSL_SSL_CONFIG_SERVICE_H_ |
OLD | NEW |