summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 04:30:23 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 04:30:23 +0000
commita9cea754e016601a59cb07be2946559a9ad21738 (patch)
treed4c5baf30736f27de914f5091fde20707d1c9e87 /chrome/browser/profile.cc
parenta65d1b09eb7adb31e9ac975962c19cdc15c44d97 (diff)
downloadchromium_src-a9cea754e016601a59cb07be2946559a9ad21738.zip
chromium_src-a9cea754e016601a59cb07be2946559a9ad21738.tar.gz
chromium_src-a9cea754e016601a59cb07be2946559a9ad21738.tar.bz2
More progress on ForceHTTPS.
Instead of turning on strict HTTPS error processing for every site, we now track which sites have opted in. Our implementation is still experimental and hidden behing the command line switch --force-https. R=darin TEST=No tests yet because this is just an experiment. Review URL: http://codereview.chromium.org/113503 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 1c76c49..cdb7c00 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -39,6 +39,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "grit/locale_settings.h"
+#include "net/base/force_tls_state.h"
using base::Time;
using base::TimeDelta;
@@ -171,6 +172,13 @@ class OffTheRecordProfileImpl : public Profile,
return ssl_host_state_.get();
}
+ virtual net::ForceTLSState* GetForceTLSState() {
+ if (!force_tls_state_.get())
+ force_tls_state_.reset(new net::ForceTLSState());
+
+ return force_tls_state_.get();
+ }
+
virtual HistoryService* GetHistoryService(ServiceAccessType sat) {
if (sat == EXPLICIT_ACCESS) {
return profile_->GetHistoryService(sat);
@@ -389,6 +397,9 @@ class OffTheRecordProfileImpl : public Profile,
// the user visited while OTR.
scoped_ptr<SSLHostState> ssl_host_state_;
+ // The ForceTLSState that only stores enabled sites in memory.
+ scoped_ptr<net::ForceTLSState> force_tls_state_;
+
// Extensions run in a different context in incognito mode.
scoped_ptr<ExtensionProcessManager> extension_process_manager_;
@@ -627,6 +638,13 @@ SSLHostState* ProfileImpl::GetSSLHostState() {
return ssl_host_state_.get();
}
+net::ForceTLSState* ProfileImpl::GetForceTLSState() {
+ if (!force_tls_state_.get())
+ force_tls_state_.reset(new net::ForceTLSState());
+
+ return force_tls_state_.get();
+}
+
PrefService* ProfileImpl::GetPrefs() {
if (!prefs_.get()) {
prefs_.reset(new PrefService(GetPrefFilePath(),