OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 NET_BASE_SSL_CONFIG_SERVICE_WIN_H_ | 5 #ifndef NET_BASE_SSL_CONFIG_SERVICE_WIN_H_ |
6 #define NET_BASE_SSL_CONFIG_SERVICE_WIN_H_ | 6 #define NET_BASE_SSL_CONFIG_SERVICE_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "net/base/ssl_config_service.h" | 10 #include "net/base/ssl_config_service.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 SSLConfigServiceWin(); | 23 SSLConfigServiceWin(); |
24 explicit SSLConfigServiceWin(base::TimeTicks now); // Used for testing. | 24 explicit SSLConfigServiceWin(base::TimeTicks now); // Used for testing. |
25 | 25 |
26 // Get the current SSL configuration settings. Can be called on any | 26 // Get the current SSL configuration settings. Can be called on any |
27 // thread. | 27 // thread. |
28 static bool GetSSLConfigNow(SSLConfig* config); | 28 static bool GetSSLConfigNow(SSLConfig* config); |
29 | 29 |
30 // Setters. Can be called on any thread. | 30 // Setters. Can be called on any thread. |
31 static void SetRevCheckingEnabled(bool enabled); | 31 static void SetRevCheckingEnabled(bool enabled); |
32 static void SetSSL2Enabled(bool enabled); | |
33 static void SetSSL3Enabled(bool enabled); | 32 static void SetSSL3Enabled(bool enabled); |
34 static void SetTLS1Enabled(bool enabled); | 33 static void SetTLS1Enabled(bool enabled); |
35 | 34 |
36 // Get the (cached) SSL configuration settings that are fresh within 10 | 35 // Get the (cached) SSL configuration settings that are fresh within 10 |
37 // seconds. This is cheaper than GetSSLConfigNow and is suitable when | 36 // seconds. This is cheaper than GetSSLConfigNow and is suitable when |
38 // we don't need the absolutely current configuration settings. This | 37 // we don't need the absolutely current configuration settings. This |
39 // method is not thread-safe, so it must be called on the same thread. | 38 // method is not thread-safe, so it must be called on the same thread. |
40 void GetSSLConfig(SSLConfig* config) { | 39 void GetSSLConfig(SSLConfig* config) { |
41 GetSSLConfigAt(config, base::TimeTicks::Now()); | 40 GetSSLConfigAt(config, base::TimeTicks::Now()); |
42 } | 41 } |
(...skipping 12 matching lines...) Expand all Loading... |
55 SSLConfig config_info_; | 54 SSLConfig config_info_; |
56 base::TimeTicks config_time_; | 55 base::TimeTicks config_time_; |
57 bool ever_updated_; | 56 bool ever_updated_; |
58 | 57 |
59 DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceWin); | 58 DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceWin); |
60 }; | 59 }; |
61 | 60 |
62 } // namespace net | 61 } // namespace net |
63 | 62 |
64 #endif // NET_BASE_SSL_CONFIG_SERVICE_WIN_H_ | 63 #endif // NET_BASE_SSL_CONFIG_SERVICE_WIN_H_ |
OLD | NEW |