Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: net/ocsp/nss_ocsp.cc

Issue 439007: Apply test isolation goodness to net_unittests. (Closed)
Patch Set: fix Linux failures Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
64 request_context_ = NULL; 66 request_context_ = NULL;
65 } 67 }
66 68
67 SEC_HttpClientFcn client_fcn_; 69 SEC_HttpClientFcn client_fcn_;
68 70
69 // I/O thread. 71 // I/O thread.
70 MessageLoop* io_loop_; // I/O thread 72 MessageLoop* io_loop_; // I/O thread
71 73
72 // URLRequestContext for OCSP handlers. 74 // URLRequestContext for OCSP handlers.
73 static URLRequestContext* request_context_; 75 static URLRequestContext* request_context_;
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // This function would be called before NSS initialization. 563 // This function would be called before NSS initialization.
562 void SetURLRequestContextForOCSP(URLRequestContext* request_context) { 564 void SetURLRequestContextForOCSP(URLRequestContext* request_context) {
563 OCSPInitSingleton::set_url_request_context(request_context); 565 OCSPInitSingleton::set_url_request_context(request_context);
564 } 566 }
565 567
566 URLRequestContext* GetURLRequestContextForOCSP() { 568 URLRequestContext* GetURLRequestContextForOCSP() {
567 return OCSPInitSingleton::url_request_context(); 569 return OCSPInitSingleton::url_request_context();
568 } 570 }
569 571
570 } // namespace net 572 } // namespace net
OLDNEW
« net/base/host_resolver_proc.cc ('K') | « net/base/run_all_unittests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698