diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-05 00:17:14 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-05 00:17:14 +0000 |
commit | 2bebd9963b25ad9e868a719fe56e348c6c153ba7 (patch) | |
tree | 49f998348a20ad7a70e36d83012adc851eb4b2c0 /net/url_request | |
parent | 5e17ec91e76c813d8fd0aa189a20d51e47ce93ca (diff) | |
download | chromium_src-2bebd9963b25ad9e868a719fe56e348c6c153ba7.zip chromium_src-2bebd9963b25ad9e868a719fe56e348c6c153ba7.tar.gz chromium_src-2bebd9963b25ad9e868a719fe56e348c6c153ba7.tar.bz2 |
This CL changes the CookieStore obect to be a refcounted object to get a better handle on its lifetime as there are cases where this object is handed out to URLRequestContext instances which outlive the URLRequestContext object which created it.
Partial fix for http://code.google.com/p/chromium/issues/detail?id=15289
Bug=15289
Review URL: http://codereview.chromium.org/197023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_context.h | 4 | ||||
-rw-r--r-- | net/url_request/url_request_unittest.cc | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 72b02ec..1c9d1c8 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -62,7 +62,7 @@ class URLRequestContext : } // Gets the cookie store for this context. - net::CookieStore* cookie_store() { return cookie_store_; } + net::CookieStore* cookie_store() { return cookie_store_.get(); } // Gets the cookie policy for this context. net::CookiePolicy* cookie_policy() { return &cookie_policy_; } @@ -117,7 +117,7 @@ class URLRequestContext : scoped_refptr<net::SSLConfigService> ssl_config_service_; net::HttpTransactionFactory* http_transaction_factory_; net::FtpTransactionFactory* ftp_transaction_factory_; - net::CookieStore* cookie_store_; + scoped_refptr<net::CookieStore> cookie_store_; net::CookiePolicy cookie_policy_; net::ForceTLSState* force_tls_state_;; net::FtpAuthCache ftp_auth_cache_; diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 3623d45..bd5c8fa 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -65,7 +65,6 @@ class URLRequestTestContext : public URLRequestContext { } virtual ~URLRequestTestContext() { - delete cookie_store_; delete ftp_transaction_factory_; delete http_transaction_factory_; } |