ssl_config_service_manager.h revision c407dc5cd9bdc5668497f21b26b09d988ab439de
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
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_
6#define CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_
7
8namespace net {
9class SSLConfigService;
10}  // namespace net
11
12class Profile;
13
14// An interface for creating SSLConfigService objects for the current platform.
15class SSLConfigServiceManager {
16 public:
17  // Create an instance of the default SSLConfigServiceManager for the current
18  // platform. The lifetime of the profile must be longer than that of the
19  // manager.
20  static SSLConfigServiceManager* CreateDefaultManager(Profile* profile);
21
22  virtual ~SSLConfigServiceManager() {}
23
24  // Get an SSLConfigService instance.  It may be a new instance or the manager
25  // may return the same instance multiple times.
26  // The caller should hold a reference as long as it needs the instance (eg,
27  // using scoped_refptr.)
28  virtual net::SSLConfigService* Get() = 0;
29};
30
31#endif  // CHROME_BROWSER_NET_SSL_CONFIG_SERVICE_MANAGER_H_
32