summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_script_fetcher.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 23:07:08 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 23:07:08 +0000
commit20d296ddc770d1bdb547bab4485ad7cb8c124085 (patch)
tree176c789a9b7a456c825c41be0d921a43537c2447 /net/proxy/proxy_script_fetcher.h
parent0e64095b374f53899df0a88fefc1e60b062b88de (diff)
downloadchromium_src-20d296ddc770d1bdb547bab4485ad7cb8c124085.zip
chromium_src-20d296ddc770d1bdb547bab4485ad7cb8c124085.tar.gz
chromium_src-20d296ddc770d1bdb547bab4485ad7cb8c124085.tar.bz2
NULL out the ProxyScriptFetcher used by ProxyService when the URLRequestContext it was using for downloads is destroyed.
This avoids the possibility of accessing freed memory when sharing ProxyService amongst request context, and the main context is destroyed first. BUG=25338 Review URL: http://codereview.chromium.org/387065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_script_fetcher.h')
-rw-r--r--net/proxy/proxy_script_fetcher.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h
index cbdb911..09ac84e 100644
--- a/net/proxy/proxy_script_fetcher.h
+++ b/net/proxy/proxy_script_fetcher.h
@@ -45,6 +45,10 @@ class ProxyScriptFetcher {
// Aborts the in-progress fetch (if any).
virtual void Cancel() = 0;
+ // Returns the request context that this fetcher uses to issue downloads,
+ // or NULL.
+ virtual URLRequestContext* GetRequestContext() { return NULL; }
+
// Create a ProxyScriptFetcher that uses |url_request_context|.
static ProxyScriptFetcher* Create(URLRequestContext* url_request_context);