diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 22:18:55 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 22:18:55 +0000 |
commit | cfc06f12ec93799d758164c22b4e53125eaade8d (patch) | |
tree | 720f317999df1744da54485efabc2d559f8f4d75 /net/ocsp/nss_ocsp.cc | |
parent | 370368ecdb0ba2b15caf52aa525385642fd4d4cf (diff) | |
download | chromium_src-cfc06f12ec93799d758164c22b4e53125eaade8d.zip chromium_src-cfc06f12ec93799d758164c22b4e53125eaade8d.tar.gz chromium_src-cfc06f12ec93799d758164c22b4e53125eaade8d.tar.bz2 |
Move NULLing of OCSP context from UI thread to IO thread, to avoid possible races.
Review URL: http://codereview.chromium.org/391062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ocsp/nss_ocsp.cc')
-rw-r--r-- | net/ocsp/nss_ocsp.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc index ce9fc1a4..62e9c82d 100644 --- a/net/ocsp/nss_ocsp.cc +++ b/net/ocsp/nss_ocsp.cc @@ -50,8 +50,8 @@ class OCSPInitSingleton { static void set_url_request_context(URLRequestContext* request_context) { request_context_ = request_context; } - URLRequestContext* url_request_context() const { - return request_context_.get(); + static URLRequestContext* url_request_context() { + return request_context_; } private: @@ -67,12 +67,12 @@ class OCSPInitSingleton { MessageLoop* io_loop_; // I/O thread // URLRequestContext for OCSP handlers. - static scoped_refptr<URLRequestContext> request_context_; + static URLRequestContext* request_context_; DISALLOW_COPY_AND_ASSIGN(OCSPInitSingleton); }; -scoped_refptr<URLRequestContext> OCSPInitSingleton::request_context_; +URLRequestContext* OCSPInitSingleton::request_context_ = NULL; // Concrete class for SEC_HTTP_REQUEST_SESSION. // Public methods except virtual methods of URLRequest::Delegate (On* methods) @@ -530,4 +530,8 @@ void SetURLRequestContextForOCSP(URLRequestContext* request_context) { OCSPInitSingleton::set_url_request_context(request_context); } +URLRequestContext* GetURLRequestContextForOCSP() { + return OCSPInitSingleton::url_request_context(); +} + } // namespace net |