Chromium Code Reviews| Index: chrome/browser/profiles/off_the_record_profile_io_data.cc |
| diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| index b6eb8eb35ef3f8ab7776330871b0415913fbbf6d..18735a8124b9ec5829652f5774586f8dd9e70139 100644 |
| --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
| @@ -5,6 +5,7 @@ |
| #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
| #include "base/bind.h" |
| +#include "base/command_line.h" |
| #include "base/logging.h" |
| #include "base/stl_util.h" |
| #include "build/build_config.h" |
| @@ -14,6 +15,7 @@ |
| #include "chrome/browser/net/chrome_network_delegate.h" |
| #include "chrome/browser/net/chrome_url_request_context.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/extensions/extension.h" |
| #include "chrome/common/pref_names.h" |
| #include "chrome/common/url_constants.h" |
| @@ -154,8 +156,13 @@ void OffTheRecordProfileIOData::LazyInitializeInternal( |
| ApplyProfileParamsToContext(main_context); |
| ApplyProfileParamsToContext(extensions_context); |
| - main_context->set_transport_security_state(transport_security_state()); |
| - extensions_context->set_transport_security_state(transport_security_state()); |
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| + transport_security_state_.reset(new net::TransportSecurityState( |
| + command_line.GetSwitchValueASCII(switches::kHstsHosts))); |
| + |
| + main_context->set_transport_security_state(transport_security_state_.get()); |
|
wtc
2012/01/06 18:45:52
One reason I am confused is this code: it seems to
agl
2012/01/06 19:08:47
I don't believe so. There's a main_context (a.k.a.
|
| + extensions_context->set_transport_security_state( |
| + transport_security_state_.get()); |
| main_context->set_net_log(io_thread->net_log()); |
| extensions_context->set_net_log(io_thread->net_log()); |