| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "net/ocsp/nss_ocsp.h" | 5 #include "net/ocsp/nss_ocsp.h" |
| 6 | 6 |
| 7 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 | 7 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 |
| 8 // until NSS 3.12.2 comes out and we update to it. | 8 // until NSS 3.12.2 comes out and we update to it. |
| 9 #define Lock FOO_NSS_Lock | 9 #define Lock FOO_NSS_Lock |
| 10 #include <certt.h> | 10 #include <certt.h> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 request_context_ = request_context; | 54 request_context_ = request_context; |
| 55 } | 55 } |
| 56 static URLRequestContext* url_request_context() { | 56 static URLRequestContext* url_request_context() { |
| 57 return request_context_; | 57 return request_context_; |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 friend struct DefaultSingletonTraits<OCSPInitSingleton>; | 61 friend struct DefaultSingletonTraits<OCSPInitSingleton>; |
| 62 OCSPInitSingleton(); | 62 OCSPInitSingleton(); |
| 63 virtual ~OCSPInitSingleton() { | 63 virtual ~OCSPInitSingleton() { |
| 64 if (io_loop_) | |
| 65 io_loop_->RemoveDestructionObserver(this); | |
| 66 request_context_ = NULL; | 64 request_context_ = NULL; |
| 67 } | 65 } |
| 68 | 66 |
| 69 SEC_HttpClientFcn client_fcn_; | 67 SEC_HttpClientFcn client_fcn_; |
| 70 | 68 |
| 71 // I/O thread. | 69 // I/O thread. |
| 72 MessageLoop* io_loop_; // I/O thread | 70 MessageLoop* io_loop_; // I/O thread |
| 73 | 71 |
| 74 // URLRequestContext for OCSP handlers. | 72 // URLRequestContext for OCSP handlers. |
| 75 static URLRequestContext* request_context_; | 73 static URLRequestContext* request_context_; |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 // This function would be called before NSS initialization. | 561 // This function would be called before NSS initialization. |
| 564 void SetURLRequestContextForOCSP(URLRequestContext* request_context) { | 562 void SetURLRequestContextForOCSP(URLRequestContext* request_context) { |
| 565 OCSPInitSingleton::set_url_request_context(request_context); | 563 OCSPInitSingleton::set_url_request_context(request_context); |
| 566 } | 564 } |
| 567 | 565 |
| 568 URLRequestContext* GetURLRequestContextForOCSP() { | 566 URLRequestContext* GetURLRequestContextForOCSP() { |
| 569 return OCSPInitSingleton::url_request_context(); | 567 return OCSPInitSingleton::url_request_context(); |
| 570 } | 568 } |
| 571 | 569 |
| 572 } // namespace net | 570 } // namespace net |
| OLD | NEW |