| OLD | NEW |
| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/browser_thread.h" | 10 #include "chrome/browser/browser_thread.h" |
| 11 #include "chrome/browser/extensions/extension_io_event_router.h" | |
| 12 #include "chrome/browser/io_thread.h" | 11 #include "chrome/browser/io_thread.h" |
| 13 #include "chrome/browser/net/chrome_cookie_policy.h" | 12 #include "chrome/browser/net/chrome_cookie_policy.h" |
| 14 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 13 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
| 15 #include "chrome/browser/net/chrome_net_log.h" | 14 #include "chrome/browser/net/chrome_net_log.h" |
| 16 #include "chrome/browser/net/chrome_network_delegate.h" | 15 #include "chrome/browser/net/chrome_network_delegate.h" |
| 17 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" | 16 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
| 18 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 19 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 20 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
| 21 #include "net/ftp/ftp_network_layer.h" | 20 #include "net/ftp/ftp_network_layer.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 new ChromeCookiePolicy(profile_params.host_content_settings_map); | 135 new ChromeCookiePolicy(profile_params.host_content_settings_map); |
| 137 | 136 |
| 138 main_request_context_->set_chrome_cookie_policy(cookie_policy); | 137 main_request_context_->set_chrome_cookie_policy(cookie_policy); |
| 139 media_request_context_->set_chrome_cookie_policy(cookie_policy); | 138 media_request_context_->set_chrome_cookie_policy(cookie_policy); |
| 140 extensions_request_context_->set_chrome_cookie_policy(cookie_policy); | 139 extensions_request_context_->set_chrome_cookie_policy(cookie_policy); |
| 141 | 140 |
| 142 main_request_context_->set_net_log(lazy_params_->io_thread->net_log()); | 141 main_request_context_->set_net_log(lazy_params_->io_thread->net_log()); |
| 143 media_request_context_->set_net_log(lazy_params_->io_thread->net_log()); | 142 media_request_context_->set_net_log(lazy_params_->io_thread->net_log()); |
| 144 extensions_request_context_->set_net_log(lazy_params_->io_thread->net_log()); | 143 extensions_request_context_->set_net_log(lazy_params_->io_thread->net_log()); |
| 145 | 144 |
| 146 extension_io_event_router_ = profile_params.extension_io_event_router; | 145 network_delegate_.reset(new ChromeNetworkDelegate( |
| 147 network_delegate_.reset( | 146 io_thread_globals->extension_event_router_forwarder.get(), |
| 148 new ChromeNetworkDelegate(extension_io_event_router_)); | 147 profile_params.profile)); |
| 149 main_request_context_->set_network_delegate(network_delegate_.get()); | 148 main_request_context_->set_network_delegate(network_delegate_.get()); |
| 150 media_request_context_->set_network_delegate(network_delegate_.get()); | 149 media_request_context_->set_network_delegate(network_delegate_.get()); |
| 151 | 150 |
| 152 main_request_context_->set_host_resolver( | 151 main_request_context_->set_host_resolver( |
| 153 io_thread_globals->host_resolver.get()); | 152 io_thread_globals->host_resolver.get()); |
| 154 media_request_context_->set_host_resolver( | 153 media_request_context_->set_host_resolver( |
| 155 io_thread_globals->host_resolver.get()); | 154 io_thread_globals->host_resolver.get()); |
| 156 main_request_context_->set_cert_verifier( | 155 main_request_context_->set_cert_verifier( |
| 157 io_thread_globals->cert_verifier.get()); | 156 io_thread_globals->cert_verifier.get()); |
| 158 media_request_context_->set_cert_verifier( | 157 media_request_context_->set_cert_verifier( |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 273 } |
| 275 | 274 |
| 276 scoped_refptr<ChromeURLRequestContext> | 275 scoped_refptr<ChromeURLRequestContext> |
| 277 ProfileImplIOData::AcquireExtensionsRequestContext() const { | 276 ProfileImplIOData::AcquireExtensionsRequestContext() const { |
| 278 DCHECK(extensions_request_context_); | 277 DCHECK(extensions_request_context_); |
| 279 scoped_refptr<ChromeURLRequestContext> context = extensions_request_context_; | 278 scoped_refptr<ChromeURLRequestContext> context = extensions_request_context_; |
| 280 extensions_request_context_->set_profile_io_data(this); | 279 extensions_request_context_->set_profile_io_data(this); |
| 281 extensions_request_context_ = NULL; | 280 extensions_request_context_ = NULL; |
| 282 return context; | 281 return context; |
| 283 } | 282 } |
| OLD | NEW |