diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-11 16:51:13 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-11 16:51:13 +0000 |
commit | 91780ac0a3e2be130ec073db636073bf04785e51 (patch) | |
tree | 3f0df2786926fd9d5226a57d521a4bb7eb107ad6 /chrome/browser/io_thread.cc | |
parent | 2549749a92f0d77fb0dd27b29747721e2a0c46e7 (diff) | |
download | chromium_src-91780ac0a3e2be130ec073db636073bf04785e51.zip chromium_src-91780ac0a3e2be130ec073db636073bf04785e51.tar.gz chromium_src-91780ac0a3e2be130ec073db636073bf04785e51.tar.bz2 |
Eagerly initialize NSS and OCSP on IOThread.
IOThread and the sync thread race to initialize OCSP (lazily done by SSLClientSocketNSS), but OCSP is only allowed to be initialized on the IOThread. So we eagerly initialize it to prevent the race. Hopefully this doesn't regress startup time!
BUG=36740
TEST=none
Review URL: http://codereview.chromium.org/3327019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r-- | chrome/browser/io_thread.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 91ea106..8d03c90 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -7,6 +7,7 @@ #include "base/command_line.h" #include "base/leak_tracker.h" #include "base/logging.h" +#include "base/nss_util.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "chrome/browser/browser_process.h" @@ -24,6 +25,7 @@ #include "net/base/net_util.h" #include "net/http/http_auth_filter.h" #include "net/http/http_auth_handler_factory.h" +#include "net/ocsp/nss_ocsp.h" namespace { @@ -175,6 +177,11 @@ void IOThread::ChangedToOnTheRecord() { void IOThread::Init() { BrowserProcessSubThread::Init(); +#if defined(USE_NSS) + base::EnsureNSSInit(); + net::EnsureOCSPInit(); +#endif // defined(USE_NSS) + DCHECK(!globals_); globals_ = new Globals; |