diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 03:58:09 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 03:58:09 +0000 |
commit | 80d6524d33061e0e4f7b06dd87ee94de3e05c7a8 (patch) | |
tree | 05719af6d66e6a107aeb056a020645ae0f483e82 /net/proxy/proxy_service.h | |
parent | 22cdd93852c8f0782cb86b066cfcd95a9121912b (diff) | |
download | chromium_src-80d6524d33061e0e4f7b06dd87ee94de3e05c7a8.zip chromium_src-80d6524d33061e0e4f7b06dd87ee94de3e05c7a8.tar.gz chromium_src-80d6524d33061e0e4f7b06dd87ee94de3e05c7a8.tar.bz2 |
Reference count ProxyService.
This is necessary since ProxyService is getting shared between chrome's url request contexts (off the record, media), and the current way it is being shared could result in free memory read/writes during shutdown.
This is a step towards fixing http://crbug.com/15289.
BUG=http://crbug.com/15289
TEST=The existing tests should continue to pass following this refactor.
Review URL: http://codereview.chromium.org/165430
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.h')
-rw-r--r-- | net/proxy/proxy_service.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h index 483e055..481aa41 100644 --- a/net/proxy/proxy_service.h +++ b/net/proxy/proxy_service.h @@ -33,11 +33,10 @@ class ProxyScriptFetcher; // This class can be used to resolve the proxy server to use when loading a // HTTP(S) URL. It uses the given ProxyResolver to handle the actual proxy // resolution. See ProxyResolverV8 for example. -class ProxyService { +class ProxyService : public base::RefCountedThreadSafe<ProxyService> { public: // The instance takes ownership of |config_service| and |resolver|. - ProxyService(ProxyConfigService* config_service, - ProxyResolver* resolver); + ProxyService(ProxyConfigService* config_service, ProxyResolver* resolver); ~ProxyService(); |