OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ |
6 #define CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ | 6 #define CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 class SSLConfigService; | 10 class SSLConfigService; |
11 } // namespace net | 11 } // namespace net |
12 | 12 |
13 class PrefService; | 13 class PrefService; |
14 | 14 |
15 // An interface for creating SSLConfigService objects. | 15 // An interface for creating SSLConfigService objects. |
16 class SSLConfigServiceManager { | 16 class SSLConfigServiceManager { |
17 public: | 17 public: |
18 // Create an instance of the SSLConfigServiceManager. The lifetime of the | 18 // Create an instance of the SSLConfigServiceManager. The lifetime of the |
19 // PrefService objects must be longer than that of the manager. Get SSL | 19 // PrefService objects must be longer than that of the manager. Get SSL |
20 // preferences from local_state object. | 20 // preferences from local_state object. |
21 static SSLConfigServiceManager* CreateDefaultManager( | 21 static SSLConfigServiceManager* CreateDefaultManager( |
22 PrefService* local_state); | 22 PrefService* local_state); |
23 | 23 |
| 24 static void RegisterPrefs(PrefService* prefs); |
| 25 |
24 virtual ~SSLConfigServiceManager() {} | 26 virtual ~SSLConfigServiceManager() {} |
25 | 27 |
26 // Get an SSLConfigService instance. It may be a new instance or the manager | 28 // Get an SSLConfigService instance. It may be a new instance or the manager |
27 // may return the same instance multiple times. | 29 // may return the same instance multiple times. |
28 // The caller should hold a reference as long as it needs the instance (eg, | 30 // The caller should hold a reference as long as it needs the instance (eg, |
29 // using scoped_refptr.) | 31 // using scoped_refptr.) |
30 virtual net::SSLConfigService* Get() = 0; | 32 virtual net::SSLConfigService* Get() = 0; |
31 }; | 33 }; |
32 | 34 |
33 #endif // CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ | 35 #endif // CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ |
OLD | NEW |