OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_ | 5 #ifndef NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_ |
6 #define NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_ | 6 #define NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_ |
7 | 7 |
8 #include "net/base/ssl_config_service.h" | 8 #include "net/base/ssl_config_service.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
12 // This SSLConfigService always returns the default SSLConfig settings. It is | 12 // This SSLConfigService always returns the default SSLConfig settings. It is |
13 // mainly useful for unittests, or for platforms that do not have a native | 13 // mainly useful for unittests, or for platforms that do not have a native |
14 // implementation of SSLConfigService yet. | 14 // implementation of SSLConfigService yet. |
15 class SSLConfigServiceDefaults : public SSLConfigService { | 15 class SSLConfigServiceDefaults : public SSLConfigService { |
16 public: | 16 public: |
17 SSLConfigServiceDefaults() {} | 17 SSLConfigServiceDefaults() {} |
18 virtual ~SSLConfigServiceDefaults() {} | |
19 | 18 |
20 // Store default SSL config settings in |config|. | 19 // Store default SSL config settings in |config|. |
21 virtual void GetSSLConfig(SSLConfig* config) { | 20 virtual void GetSSLConfig(SSLConfig* config) { |
22 *config = default_config_; | 21 *config = default_config_; |
23 } | 22 } |
24 | 23 |
25 private: | 24 private: |
| 25 virtual ~SSLConfigServiceDefaults() {} |
| 26 |
26 // Default value of prefs. | 27 // Default value of prefs. |
27 const SSLConfig default_config_; | 28 const SSLConfig default_config_; |
28 | 29 |
29 DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceDefaults); | 30 DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceDefaults); |
30 }; | 31 }; |
31 | 32 |
32 } // namespace net | 33 } // namespace net |
33 | 34 |
34 #endif // NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_ | 35 #endif // NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_ |
OLD | NEW |