• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2011 The Chromium Authors
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 NET_SSL_SSL_CONFIG_SERVICE_DEFAULTS_H_
6 #define NET_SSL_SSL_CONFIG_SERVICE_DEFAULTS_H_
7 
8 #include "net/base/net_export.h"
9 #include "net/ssl/ssl_config_service.h"
10 
11 namespace net {
12 
13 // This SSLConfigService always returns the default SSLConfig settings.  It is
14 // mainly useful for unittests, or for platforms that do not have a native
15 // implementation of SSLConfigService yet.
16 class NET_EXPORT SSLConfigServiceDefaults : public SSLConfigService {
17  public:
18   SSLConfigServiceDefaults();
19 
20   SSLConfigServiceDefaults(const SSLConfigServiceDefaults&) = delete;
21   SSLConfigServiceDefaults& operator=(const SSLConfigServiceDefaults&) = delete;
22 
23   ~SSLConfigServiceDefaults() override;
24 
25   // Returns the default SSL config settings.
26   SSLContextConfig GetSSLContextConfig() override;
27 
28   bool CanShareConnectionWithClientCerts(
29       const std::string& hostname) const override;
30 
31  private:
32   // Default value of prefs.
33   const SSLContextConfig default_config_;
34 };
35 
36 }  // namespace net
37 
38 #endif  // NET_SSL_SSL_CONFIG_SERVICE_DEFAULTS_H_
39