summaryrefslogtreecommitdiffstats
path: root/net/base/ssl_config_service_defaults.h
blob: 5425b27fdacd19474d66d2cc1208511430c048cd (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
// 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.

#ifndef NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_
#define NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_

#include "net/base/ssl_config_service.h"

namespace net {

// This SSLConfigService always returns the default SSLConfig settings.  It is
// mainly useful for unittests, or for platforms that do not have a native
// implementation of SSLConfigService yet.
class SSLConfigServiceDefaults : public SSLConfigService {
 public:
  SSLConfigServiceDefaults() {}

  // Store default SSL config settings in |config|.
  virtual void GetSSLConfig(SSLConfig* config) {
    *config = default_config_;
  }

 private:
  virtual ~SSLConfigServiceDefaults() {}

  // Default value of prefs.
  const SSLConfig default_config_;

  DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceDefaults);
};

}  // namespace net

#endif  // NET_BASE_SSL_CONFIG_SERVICE_DEFAULTS_H_