Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 8997012: Make incognito windows not inherit HSTS state from the main profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: g try Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 5d5603508e7ce579543c2e770d5a5090de7cab82..98d505d1e27c98e62a760f9127a638582e29423f 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/net/sqlite_persistent_cookie_store.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/transport_security_persister.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -262,6 +263,13 @@ void ProfileImplIOData::LazyInitializeInternal(
if (http_server_properties_manager_.get())
http_server_properties_manager_->InitializeOnIOThread();
+ transport_security_state_.reset(new net::TransportSecurityState(
+ command_line.GetSwitchValueASCII(switches::kHstsHosts)));
+ transport_security_persister_.reset(
+ new TransportSecurityPersister(transport_security_state_.get(),
+ profile_params->path,
+ profile_params->is_incognito));
+
main_context->set_transport_security_state(transport_security_state());
media_request_context_->set_transport_security_state(
transport_security_state());

Powered by Google App Engine
This is Rietveld 408576698