Skip to content
Snippets Groups Projects
  • willchan@chromium.org's avatar
    929935b8
    Reland r59972: Eagerly set the IO loop used for OCSP. · 929935b8
    willchan@chromium.org authored
    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
    929935b8
    History
    Reland r59972: Eagerly set the IO loop used for OCSP.
    willchan@chromium.org authored
    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