Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: components/ssl_config/ssl_config_service_manager.h

Issue 1320533007: Componentize ssl_config_service_manager_pref.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve -Wnewline-eof mac_chromium bot failure Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 COMPONENTS_SSL_CONFIG_SSL_CONFIG_SERVICE_MANAGER_H_
6 #define CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ 6 #define COMPONENTS_SSL_CONFIG_SSL_CONFIG_SERVICE_MANAGER_H_
7
8 #include "base/memory/ref_counted.h"
9
10 namespace base {
11 class SingleThreadTaskRunner;
12 }
7 13
8 namespace net { 14 namespace net {
9 class SSLConfigService; 15 class SSLConfigService;
10 } // namespace net 16 } // namespace net
11 17
12 class PrefService; 18 class PrefService;
13 class PrefRegistrySimple; 19 class PrefRegistrySimple;
14 20
21 namespace ssl_config {
22
15 // An interface for creating SSLConfigService objects. 23 // An interface for creating SSLConfigService objects.
16 class SSLConfigServiceManager { 24 class SSLConfigServiceManager {
17 public: 25 public:
18 // Create an instance of the SSLConfigServiceManager. The lifetime of the 26 // Create an instance of the SSLConfigServiceManager. The lifetime of the
19 // PrefService objects must be longer than that of the manager. Get SSL 27 // PrefService objects must be longer than that of the manager. Get SSL
20 // preferences from local_state object. 28 // preferences from local_state object.
21 static SSLConfigServiceManager* CreateDefaultManager( 29 static SSLConfigServiceManager* CreateDefaultManager(
22 PrefService* local_state); 30 PrefService* local_state,
31 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
23 32
24 static void RegisterPrefs(PrefRegistrySimple* registry); 33 static void RegisterPrefs(PrefRegistrySimple* registry);
25 34
26 virtual ~SSLConfigServiceManager() {} 35 virtual ~SSLConfigServiceManager() {}
27 36
28 // Get an SSLConfigService instance. It may be a new instance or the manager 37 // Get an SSLConfigService instance. It may be a new instance or the manager
29 // may return the same instance multiple times. 38 // may return the same instance multiple times.
30 // The caller should hold a reference as long as it needs the instance (eg, 39 // The caller should hold a reference as long as it needs the instance (eg,
31 // using scoped_refptr.) 40 // using scoped_refptr.)
32 virtual net::SSLConfigService* Get() = 0; 41 virtual net::SSLConfigService* Get() = 0;
33 }; 42 };
34 43
35 #endif // CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_ 44 } // namespace ssl_config
45 #endif // COMPONENTS_SSL_CONFIG_SSL_CONFIG_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/ssl_config/ssl_config_prefs.cc ('k') | components/ssl_config/ssl_config_service_manager_pref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698