diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 04:52:10 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 04:52:10 +0000 |
commit | 06fb18592e5fad681cf33d80bae8a51862d8a923 (patch) | |
tree | 2387de7c639cfad967dd1706e38adfcabdf0b2bb /net/url_request | |
parent | c61f5aac1ffcda0e5a835ed2dd8144b825582a5b (diff) | |
download | chromium_src-06fb18592e5fad681cf33d80bae8a51862d8a923.zip chromium_src-06fb18592e5fad681cf33d80bae8a51862d8a923.tar.gz chromium_src-06fb18592e5fad681cf33d80bae8a51862d8a923.tar.bz2 |
Revert 60739 (still leaks on ChromiumOS!) - 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
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/3421039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_context.cc | 3 | ||||
-rw-r--r-- | net/url_request/url_request_context.h | 8 |
2 files changed, 1 insertions, 10 deletions
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc index 5c50bbb..0ea8477 100644 --- a/net/url_request/url_request_context.cc +++ b/net/url_request/url_request_context.cc @@ -15,8 +15,7 @@ URLRequestContext::URLRequestContext() http_auth_handler_factory_(NULL), network_delegate_(NULL), cookie_policy_(NULL), - transport_security_state_(NULL), - is_main_(false) { + transport_security_state_(NULL) { } const std::string& URLRequestContext::GetUserAgent(const GURL& url) const { diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 548d0c6..6ddc940 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -104,11 +104,6 @@ class URLRequestContext referrer_charset_ = charset; } - // Controls whether or not the URLRequestContext considers itself to be the - // "main" URLRequestContext. - bool is_main() const { return is_main_; } - void set_is_main(bool is_main) { is_main_ = is_main; } - protected: friend class base::RefCountedThreadSafe<URLRequestContext>; @@ -136,9 +131,6 @@ class URLRequestContext std::string referrer_charset_; private: - // Indicates whether or not this is the main URLRequestContext. - bool is_main_; - DISALLOW_COPY_AND_ASSIGN(URLRequestContext); }; |