diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 22:01:37 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 22:01:37 +0000 |
commit | 673336b8ef5a8708d7d3fe0dc8c3daa8d12d4097 (patch) | |
tree | 8ebf30b2881b71786236ce0383e18ba52290a083 /chrome/browser/profile.cc | |
parent | 43eb2f8c2daa0a67a04fbfdf60554774b021ded4 (diff) | |
download | chromium_src-673336b8ef5a8708d7d3fe0dc8c3daa8d12d4097.zip chromium_src-673336b8ef5a8708d7d3fe0dc8c3daa8d12d4097.tar.gz chromium_src-673336b8ef5a8708d7d3fe0dc8c3daa8d12d4097.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 user data directory for the moment.
You still need the --force-https flag in order to trigger any ForceTLS
behaviour, however.
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@25382 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..a8377d3 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()); + } return force_tls_state_.get(); } |