diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 00:40:11 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 00:40:11 +0000 |
commit | 929935b8e40b7441d72e720752cbe5fcd99e4432 (patch) | |
tree | 956cc74d84b977c061378cb711c54adda89ea2e9 /chrome/browser/profile_impl.cc | |
parent | ea6f72a97cc771f6d4ecd3f32fbba8e678a0127f (diff) | |
download | chromium_src-929935b8e40b7441d72e720752cbe5fcd99e4432.zip chromium_src-929935b8e40b7441d72e720752cbe5fcd99e4432.tar.gz chromium_src-929935b8e40b7441d72e720752cbe5fcd99e4432.tar.bz2 |
Reland r59972: 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.
The only change from r59972 is the location that I set_is_main(). I set it when we set the default request context. This is because, by the time I had called set_is_main() in BrowserMain, the ChromeURLRequestContextGetter was already created (it gets created during the CreateProfile() function). So I was too late.
BUG=55940
TEST=Manual
Review URL: http://codereview.chromium.org/3391028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile_impl.cc')
-rw-r--r-- | chrome/browser/profile_impl.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc index 5a61e1c..8203739c 100644 --- a/chrome/browser/profile_impl.cc +++ b/chrome/browser/profile_impl.cc @@ -722,6 +722,7 @@ URLRequestContextGetter* ProfileImpl::GetRequestContext() { // created first. if (!default_request_context_) { default_request_context_ = request_context_; + request_context_->set_is_main(true); // TODO(eroman): this isn't terribly useful anymore now that the // URLRequestContext is constructed by the IO thread... NotificationService::current()->Notify( |