Chromium Code Reviews| 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 | 7 |
| 8 namespace net { | 8 namespace net { |
| 9 class SSLConfigService; | 9 class SSLConfigService; |
| 10 } // namespace net | 10 } // namespace net |
| 11 | 11 |
| 12 class PrefService; | 12 class PrefService; |
| 13 | 13 |
| 14 // An interface for creating SSLConfigService objects. | 14 // An interface for creating SSLConfigService objects. |
| 15 class SSLConfigServiceManager { | 15 class SSLConfigServiceManager { |
| 16 public: | 16 public: |
| 17 // Create an instance of the SSLConfigServiceManager. The lifetime of the | 17 // Create an instance of the SSLConfigServiceManager. The lifetime of the |
| 18 // PrefService objects must be longer than that of the manager. Get SSL | 18 // PrefService objects must be longer than that of the manager. Get SSL |
| 19 // preferences from local_state object. | 19 // preferences from local_state object. The user_prefs may be NULL if this |
| 20 // SSLConfigServiceManager is not associated with a profile. | |
| 20 static SSLConfigServiceManager* CreateDefaultManager( | 21 static SSLConfigServiceManager* CreateDefaultManager( |
| 21 PrefService* local_state); | 22 PrefService* local_state, PrefService* user_prefs); |
|
sky
2012/09/12 04:35:53
nit: when you wrap, each param on its own line.
mattm
2012/09/12 19:07:17
Done.
| |
| 22 | 23 |
| 23 static void RegisterPrefs(PrefService* prefs); | 24 static void RegisterPrefs(PrefService* local_state); |
| 24 | 25 |
| 25 virtual ~SSLConfigServiceManager() {} | 26 virtual ~SSLConfigServiceManager() {} |
| 26 | 27 |
| 27 // 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 |
| 28 // may return the same instance multiple times. | 29 // may return the same instance multiple times. |
| 29 // 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, |
| 30 // using scoped_refptr.) | 31 // using scoped_refptr.) |
| 31 virtual net::SSLConfigService* Get() = 0; | 32 virtual net::SSLConfigService* Get() = 0; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 #endif // CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ | 35 #endif // CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ |
| OLD | NEW |