summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-20 20:29:29 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-20 20:29:29 +0000
commitd99671151e98412870f1adf719b4a94fc9a7ca52 (patch)
treefa2854bb5443c78e385edc6c0e0f5e04fabd89ba /chrome/browser/io_thread.cc
parentd049874acef2be3c17612d4a06b480f3a45ea6e9 (diff)
downloadchromium_src-d99671151e98412870f1adf719b4a94fc9a7ca52.zip
chromium_src-d99671151e98412870f1adf719b4a94fc9a7ca52.tar.gz
chromium_src-d99671151e98412870f1adf719b4a94fc9a7ca52.tar.bz2
Reland r59511: Eagerly set the IO loop used for OCSP.
ChromeOS will create a special Profile for login. Previously, OCSP initialization was done for the "default" ChromeURLRequestContext for each Profile. Since we can have multiple profiles, this causes the initialization (and uninitialization) to happen multiple times, which causes problems for OCSP since we use statics. The solution is to identify the "main" Profile. We create said Profile in BrowserMain. I add an "is_main_" variable to URLRequestContextGetter and URLRequestContext, so that only the "main" URLRequestContext will initialize OCSP. Other than minor plumbing of "is_main_", this changelist is identical to r59511. BUG=55940 TEST=Startup ChromeOS's Chrome. Should not crash on startup. Review URL: http://codereview.chromium.org/3470001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index f361b77..ed82c27 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -24,6 +24,9 @@
#include "net/base/net_util.h"
#include "net/http/http_auth_filter.h"
#include "net/http/http_auth_handler_factory.h"
+#if defined(USE_NSS)
+#include "net/ocsp/nss_ocsp.h"
+#endif // defined(USE_NSS)
namespace {
@@ -157,6 +160,12 @@ void IOThread::ChangedToOnTheRecord() {
void IOThread::Init() {
BrowserProcessSubThread::Init();
+ DCHECK_EQ(MessageLoop::TYPE_IO, message_loop()->type());
+
+#if defined(USE_NSS)
+ net::SetMessageLoopForOCSP();
+#endif // defined(USE_NSS)
+
DCHECK(!globals_);
globals_ = new Globals;