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

Side by Side 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: ... Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "chrome/browser/io_thread.h" 12 #include "chrome/browser/io_thread.h"
13 #include "chrome/browser/net/chrome_net_log.h" 13 #include "chrome/browser/net/chrome_net_log.h"
14 #include "chrome/browser/net/chrome_network_delegate.h" 14 #include "chrome/browser/net/chrome_network_delegate.h"
15 #include "chrome/browser/net/connect_interceptor.h" 15 #include "chrome/browser/net/connect_interceptor.h"
16 #include "chrome/browser/net/http_server_properties_manager.h" 16 #include "chrome/browser/net/http_server_properties_manager.h"
17 #include "chrome/browser/net/predictor.h" 17 #include "chrome/browser/net/predictor.h"
18 #include "chrome/browser/net/sqlite_origin_bound_cert_store.h" 18 #include "chrome/browser/net/sqlite_origin_bound_cert_store.h"
19 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" 19 #include "chrome/browser/net/sqlite_persistent_cookie_store.h"
20 #include "chrome/browser/prefs/pref_member.h" 20 #include "chrome/browser/prefs/pref_member.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/transport_security_persister.h"
22 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/pref_names.h" 25 #include "chrome/common/pref_names.h"
25 #include "chrome/common/url_constants.h" 26 #include "chrome/common/url_constants.h"
26 #include "content/browser/resource_context.h" 27 #include "content/browser/resource_context.h"
27 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
28 #include "net/base/origin_bound_cert_service.h" 29 #include "net/base/origin_bound_cert_service.h"
29 #include "net/ftp/ftp_network_layer.h" 30 #include "net/ftp/ftp_network_layer.h"
30 #include "net/http/http_cache.h" 31 #include "net/http/http_cache.h"
31 #include "net/url_request/url_request_job_factory.h" 32 #include "net/url_request/url_request_job_factory.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 256
256 // Initialize context members. 257 // Initialize context members.
257 258
258 ApplyProfileParamsToContext(main_context); 259 ApplyProfileParamsToContext(main_context);
259 ApplyProfileParamsToContext(media_request_context_); 260 ApplyProfileParamsToContext(media_request_context_);
260 ApplyProfileParamsToContext(extensions_context); 261 ApplyProfileParamsToContext(extensions_context);
261 262
262 if (http_server_properties_manager_.get()) 263 if (http_server_properties_manager_.get())
263 http_server_properties_manager_->InitializeOnIOThread(); 264 http_server_properties_manager_->InitializeOnIOThread();
264 265
266 transport_security_persister_.reset(
267 new TransportSecurityPersister(transport_security_state(),
268 profile_params->path,
269 profile_params->is_incognito));
270
265 main_context->set_transport_security_state(transport_security_state()); 271 main_context->set_transport_security_state(transport_security_state());
266 media_request_context_->set_transport_security_state( 272 media_request_context_->set_transport_security_state(
267 transport_security_state()); 273 transport_security_state());
268 extensions_context->set_transport_security_state(transport_security_state()); 274 extensions_context->set_transport_security_state(transport_security_state());
269 275
270 main_context->set_net_log(io_thread->net_log()); 276 main_context->set_net_log(io_thread->net_log());
271 media_request_context_->set_net_log(io_thread->net_log()); 277 media_request_context_->set_net_log(io_thread->net_log());
272 extensions_context->set_net_log(io_thread->net_log()); 278 extensions_context->set_net_log(io_thread->net_log());
273 279
274 main_context->set_network_delegate(network_delegate()); 280 main_context->set_network_delegate(network_delegate());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 scoped_refptr<ChromeURLRequestContext> 495 scoped_refptr<ChromeURLRequestContext>
490 ProfileImplIOData::AcquireIsolatedAppRequestContext( 496 ProfileImplIOData::AcquireIsolatedAppRequestContext(
491 scoped_refptr<ChromeURLRequestContext> main_context, 497 scoped_refptr<ChromeURLRequestContext> main_context,
492 const std::string& app_id) const { 498 const std::string& app_id) const {
493 // We create per-app contexts on demand, unlike the others above. 499 // We create per-app contexts on demand, unlike the others above.
494 scoped_refptr<ChromeURLRequestContext> app_request_context = 500 scoped_refptr<ChromeURLRequestContext> app_request_context =
495 InitializeAppRequestContext(main_context, app_id); 501 InitializeAppRequestContext(main_context, app_id);
496 DCHECK(app_request_context); 502 DCHECK(app_request_context);
497 return app_request_context; 503 return app_request_context;
498 } 504 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698