summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 04:52:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 04:52:10 +0000
commit06fb18592e5fad681cf33d80bae8a51862d8a923 (patch)
tree2387de7c639cfad967dd1706e38adfcabdf0b2bb /chrome/common
parentc61f5aac1ffcda0e5a835ed2dd8144b825582a5b (diff)
downloadchromium_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 'chrome/common')
-rw-r--r--chrome/common/net/url_request_context_getter.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/chrome/common/net/url_request_context_getter.h b/chrome/common/net/url_request_context_getter.h
index 8b51a0b..34aa668 100644
--- a/chrome/common/net/url_request_context_getter.h
+++ b/chrome/common/net/url_request_context_getter.h
@@ -35,32 +35,15 @@ class URLRequestContextGetter
// may be used).
virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() = 0;
- // Controls whether or not the URLRequestContextGetter considers itself to be
- // the the "main" URLRequestContextGetter. Note that each Profile will have a
- // "default" URLRequestContextGetter. Therefore, "is_main" refers to the
- // default URLRequestContextGetter for the "main" Profile.
- // TODO(willchan): Move this code to ChromeURLRequestContextGetter, since this
- // ia a browser process specific concept.
- void set_is_main(bool is_main) { is_main_ = is_main; }
-
protected:
friend class DeleteTask<URLRequestContextGetter>;
friend struct URLRequestContextGetterTraits;
- URLRequestContextGetter() : is_main_(false) {}
-
virtual ~URLRequestContextGetter() {}
-
- bool is_main() const { return is_main_; }
-
private:
// OnDestruct is meant to ensure deletion on the thread on which the request
// IO happens.
void OnDestruct();
-
- // Indicates whether or not this is the default URLRequestContextGetter for
- // the main Profile.
- bool is_main_;
};
struct URLRequestContextGetterTraits {
@@ -70,3 +53,4 @@ struct URLRequestContextGetterTraits {
};
#endif // CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_
+