diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 16:57:51 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 16:57:51 +0000 |
commit | 887f80da171aa9a6c3e6edad585634ce287258a7 (patch) | |
tree | 7538f30384ca23e4626c08cef4934135b767d238 /chrome/browser/profile.cc | |
parent | da230a3e8e28a88871252a724dc097c5da4496de (diff) | |
download | chromium_src-887f80da171aa9a6c3e6edad585634ce287258a7.zip chromium_src-887f80da171aa9a6c3e6edad585634ce287258a7.tar.gz chromium_src-887f80da171aa9a6c3e6edad585634ce287258a7.tar.bz2 |
ForceTLS: persist to disk
With this patch, we'll persist ForceTLS state to disk. It's saved as a
JSON file (ForceTLSState) in the profile directory for the moment.
You still need the --force-https flag in order to trigger any ForceTLS
behaviour.
For the moment, this state isn't cleared when the rest of the browser
state it. That's ok because it's still behind a flag.
http://codereview.chromium.org/186014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 1aa04e8..88d02e8 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -20,6 +20,7 @@ #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/favicon_service.h" +#include "chrome/browser/force_tls_persister.h" #include "chrome/browser/history/history.h" #include "chrome/browser/in_process_webkit/webkit_context.h" #include "chrome/browser/net/chrome_url_request_context.h" @@ -264,7 +265,7 @@ class OffTheRecordProfileImpl : public Profile, virtual net::ForceTLSState* GetForceTLSState() { if (!force_tls_state_.get()) - force_tls_state_.reset(new net::ForceTLSState()); + force_tls_state_ = new net::ForceTLSState(); return force_tls_state_.get(); } @@ -521,7 +522,7 @@ class OffTheRecordProfileImpl : public Profile, scoped_ptr<SSLHostState> ssl_host_state_; // The ForceTLSState that only stores enabled sites in memory. - scoped_ptr<net::ForceTLSState> force_tls_state_; + scoped_refptr<net::ForceTLSState> force_tls_state_; // Time we were started. Time start_time_; @@ -823,8 +824,11 @@ SSLHostState* ProfileImpl::GetSSLHostState() { } net::ForceTLSState* ProfileImpl::GetForceTLSState() { - if (!force_tls_state_.get()) - force_tls_state_.reset(new net::ForceTLSState()); + if (!force_tls_state_.get()) { + force_tls_state_ = new net::ForceTLSState(); + force_tls_persister_ = new ForceTLSPersister( + force_tls_state_.get(), g_browser_process->file_thread(), path_); + } return force_tls_state_.get(); } |