OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OCSP_NSS_OCSP_H_ | 5 #ifndef NET_OCSP_NSS_OCSP_H_ |
6 #define NET_OCSP_NSS_OCSP_H_ | 6 #define NET_OCSP_NSS_OCSP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 namespace net { |
| 10 |
9 class URLRequestContext; | 11 class URLRequestContext; |
10 | 12 |
11 namespace net { | |
12 | |
13 // Sets the MessageLoop for OCSP to the current message loop. | 13 // Sets the MessageLoop for OCSP to the current message loop. |
14 // This should be called before EnsureOCSPInit() if you want to | 14 // This should be called before EnsureOCSPInit() if you want to |
15 // control the message loop for OCSP. | 15 // control the message loop for OCSP. |
16 void SetMessageLoopForOCSP(); | 16 void SetMessageLoopForOCSP(); |
17 | 17 |
18 // Initializes OCSP handlers for NSS. This must be called before any | 18 // Initializes OCSP handlers for NSS. This must be called before any |
19 // certificate verification functions. This function is thread-safe, and OCSP | 19 // certificate verification functions. This function is thread-safe, and OCSP |
20 // handlers will only ever be initialized once. ShutdownOCSP() must be called | 20 // handlers will only ever be initialized once. ShutdownOCSP() must be called |
21 // on shutdown. | 21 // on shutdown. |
22 void EnsureOCSPInit(); | 22 void EnsureOCSPInit(); |
23 | 23 |
24 // This should be called once on shutdown to stop issuing URLRequests for OCSP. | 24 // This should be called once on shutdown to stop issuing URLRequests for OCSP. |
25 void ShutdownOCSP(); | 25 void ShutdownOCSP(); |
26 | 26 |
27 // Set URLRequestContext for OCSP handlers. | 27 // Set URLRequestContext for OCSP handlers. |
28 void SetURLRequestContextForOCSP(URLRequestContext* request_context); | 28 void SetURLRequestContextForOCSP(URLRequestContext* request_context); |
29 URLRequestContext* GetURLRequestContextForOCSP(); | 29 URLRequestContext* GetURLRequestContextForOCSP(); |
30 | 30 |
31 } // namespace net | 31 } // namespace net |
32 | 32 |
33 #endif // NET_OCSP_NSS_OCSP_H_ | 33 #endif // NET_OCSP_NSS_OCSP_H_ |
OLD | NEW |