diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 04:28:45 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 04:28:45 +0000 |
commit | b7254a7f4d0a2eec8259e3f4e34a997cf8504430 (patch) | |
tree | 9f00c1b1b535d5576366bb1896c5208b904ea082 | |
parent | 941b4c5b6303aad0b3426440cabdf7cb8a90be46 (diff) | |
download | chromium_src-b7254a7f4d0a2eec8259e3f4e34a997cf8504430.zip chromium_src-b7254a7f4d0a2eec8259e3f4e34a997cf8504430.tar.gz chromium_src-b7254a7f4d0a2eec8259e3f4e34a997cf8504430.tar.bz2 |
URLRequestContext needs to keep a reference to StrictTransportSecurityState
StrictTransportSecurityPersister needs to unregister itself as the delegate before it gets deleted.
BUG=21897
TEST=see bug
Review URL: http://codereview.chromium.org/217012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26794 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/strict_transport_security_persister.cc | 4 | ||||
-rw-r--r-- | chrome/browser/strict_transport_security_persister.h | 2 | ||||
-rw-r--r-- | net/url_request/url_request_context.h | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/strict_transport_security_persister.cc b/chrome/browser/strict_transport_security_persister.cc index c9120ad..310cf23 100644 --- a/chrome/browser/strict_transport_security_persister.cc +++ b/chrome/browser/strict_transport_security_persister.cc @@ -29,6 +29,10 @@ StrictTransportSecurityPersister::StrictTransportSecurityPersister( 1000 /* 1 second */); } +StrictTransportSecurityPersister::~StrictTransportSecurityPersister() { + strict_transport_security_state_->SetDelegate(NULL); +} + void StrictTransportSecurityPersister::LoadState() { // Runs on |file_thread_| AutoLock locked_(lock_); diff --git a/chrome/browser/strict_transport_security_persister.h b/chrome/browser/strict_transport_security_persister.h index f7457304..28c4139 100644 --- a/chrome/browser/strict_transport_security_persister.h +++ b/chrome/browser/strict_transport_security_persister.h @@ -47,6 +47,8 @@ class StrictTransportSecurityPersister : base::Thread* file_thread, const FilePath& profile_path); + ~StrictTransportSecurityPersister(); + // Called by the StrictTransportSecurityState when it changes its state. virtual void StateIsDirty(net::StrictTransportSecurityState*); diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 5f852e7..37cf650 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -16,11 +16,11 @@ #include "net/base/cookie_store.h" #include "net/base/host_resolver.h" #include "net/base/ssl_config_service.h" +#include "net/base/strict_transport_security_state.h" #include "net/ftp/ftp_auth_cache.h" #include "net/proxy/proxy_service.h" namespace net { -class StrictTransportSecurityState; class FtpTransactionFactory; class HttpTransactionFactory; } @@ -120,7 +120,8 @@ class URLRequestContext : net::FtpTransactionFactory* ftp_transaction_factory_; scoped_refptr<net::CookieStore> cookie_store_; net::CookiePolicy cookie_policy_; - net::StrictTransportSecurityState* strict_transport_security_state_; + scoped_refptr<net::StrictTransportSecurityState> + strict_transport_security_state_; net::FtpAuthCache ftp_auth_cache_; std::string accept_language_; std::string accept_charset_; |