summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/ssl_config_service_manager_system.cc
blob: 15ac023bcec6c46164f8bc045dd5d7cc4f1dcb8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/net/ssl_config_service_manager.h"
#include "net/base/ssl_config_service.h"

class Profile;

////////////////////////////////////////////////////////////////////////////////
//  SSLConfigServiceManagerSystem

// The manager for holding a system SSLConfigService instance.  System
// SSLConfigService objects do not depend on the profile.
class SSLConfigServiceManagerSystem
    : public SSLConfigServiceManager {
 public:
  SSLConfigServiceManagerSystem()
      : ssl_config_service_(
          net::SSLConfigService::CreateSystemSSLConfigService()) {
  }
  virtual ~SSLConfigServiceManagerSystem() {}

  virtual net::SSLConfigService* Get() {
    return ssl_config_service_;
  }

 private:
  scoped_refptr<net::SSLConfigService> ssl_config_service_;

  DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceManagerSystem);
};

////////////////////////////////////////////////////////////////////////////////
//  SSLConfigServiceManager

// static
SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager(
    Profile* profile) {
  return new SSLConfigServiceManagerSystem();
}