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

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

Issue 9693004: net: always enable NSS's HTTP fetches (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <certt.h> 7 #include <certt.h>
8 #include <certdb.h> 8 #include <certdb.h>
9 #include <ocsp.h> 9 #include <ocsp.h>
10 #include <nspr.h> 10 #include <nspr.h>
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } 908 }
909 } 909 }
910 910
911 return NULL; 911 return NULL;
912 } 912 }
913 913
914 } // anonymous namespace 914 } // anonymous namespace
915 915
916 namespace net { 916 namespace net {
917 917
918 void SetMessageLoopForOCSP() { 918 void SetMessageLoopForNssPkixIO() {
919 // Must have a MessageLoopForIO. 919 // Must have a MessageLoopForIO.
920 DCHECK(MessageLoopForIO::current()); 920 DCHECK(MessageLoopForIO::current());
921 921
922 bool used = g_ocsp_io_loop.Get().used(); 922 bool used = g_ocsp_io_loop.Get().used();
923 923
924 // Should not be called when g_ocsp_io_loop has already been used. 924 // Should not be called when g_ocsp_io_loop has already been used.
925 DCHECK(!used); 925 DCHECK(!used);
926 } 926 }
927 927
928 void EnsureOCSPInit() { 928 void EnsureNssPkixIOInit() {
929 g_ocsp_io_loop.Get().StartUsing(); 929 g_ocsp_io_loop.Get().StartUsing();
930 g_ocsp_nss_initialization.Get(); 930 g_ocsp_nss_initialization.Get();
931 } 931 }
932 932
933 void ShutdownOCSP() { 933 void ShutdownNssPkixIO() {
934 g_ocsp_io_loop.Get().Shutdown(); 934 g_ocsp_io_loop.Get().Shutdown();
935 } 935 }
936 936
937 // This function would be called before NSS initialization. 937 // This function would be called before NSS initialization.
938 void SetURLRequestContextForOCSP(URLRequestContext* request_context) { 938 void SetURLRequestContextForNssPkixIO(URLRequestContext* request_context) {
939 pthread_mutex_lock(&g_request_context_lock); 939 pthread_mutex_lock(&g_request_context_lock);
940 if (request_context) { 940 if (request_context) {
941 DCHECK(!g_request_context); 941 DCHECK(!g_request_context);
942 } 942 }
943 g_request_context = request_context; 943 g_request_context = request_context;
944 pthread_mutex_unlock(&g_request_context_lock); 944 pthread_mutex_unlock(&g_request_context_lock);
945 } 945 }
946 946
947 } // namespace net 947 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698