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/io_thread.h" | 10 #include "chrome/browser/io_thread.h" |
11 #include "chrome/browser/net/chrome_cookie_policy.h" | 11 #include "chrome/browser/net/chrome_cookie_policy.h" |
12 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 12 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.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/proxy_service_factory.h" |
15 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" | 16 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
16 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
19 #include "content/browser/browser_thread.h" | 20 #include "content/browser/browser_thread.h" |
20 #include "net/ftp/ftp_network_layer.h" | 21 #include "net/ftp/ftp_network_layer.h" |
21 #include "net/http/http_cache.h" | 22 #include "net/http/http_cache.h" |
22 | 23 |
23 ProfileImplIOData::Handle::Handle(Profile* profile) | 24 ProfileImplIOData::Handle::Handle(Profile* profile) |
24 : io_data_(new ProfileImplIOData), | 25 : io_data_(new ProfileImplIOData), |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 media_request_context_->set_http_auth_handler_factory( | 167 media_request_context_->set_http_auth_handler_factory( |
167 io_thread_globals->http_auth_handler_factory.get()); | 168 io_thread_globals->http_auth_handler_factory.get()); |
168 | 169 |
169 dns_cert_checker_.reset( | 170 dns_cert_checker_.reset( |
170 CreateDnsCertProvenanceChecker(io_thread_globals->dnsrr_resolver.get(), | 171 CreateDnsCertProvenanceChecker(io_thread_globals->dnsrr_resolver.get(), |
171 main_request_context_)); | 172 main_request_context_)); |
172 main_request_context_->set_dns_cert_checker(dns_cert_checker_.get()); | 173 main_request_context_->set_dns_cert_checker(dns_cert_checker_.get()); |
173 media_request_context_->set_dns_cert_checker(dns_cert_checker_.get()); | 174 media_request_context_->set_dns_cert_checker(dns_cert_checker_.get()); |
174 | 175 |
175 net::ProxyService* proxy_service = | 176 net::ProxyService* proxy_service = |
176 CreateProxyService( | 177 ProxyServiceFactory::CreateProxyService( |
177 io_thread->net_log(), | 178 io_thread->net_log(), |
178 io_thread_globals->proxy_script_fetcher_context.get(), | 179 io_thread_globals->proxy_script_fetcher_context.get(), |
179 lazy_params_->profile_params.proxy_config_service.release(), | 180 lazy_params_->profile_params.proxy_config_service.release(), |
180 command_line); | 181 command_line); |
181 main_request_context_->set_proxy_service(proxy_service); | 182 main_request_context_->set_proxy_service(proxy_service); |
182 media_request_context_->set_proxy_service(proxy_service); | 183 media_request_context_->set_proxy_service(proxy_service); |
183 | 184 |
184 net::HttpCache::DefaultBackend* main_backend = | 185 net::HttpCache::DefaultBackend* main_backend = |
185 new net::HttpCache::DefaultBackend( | 186 new net::HttpCache::DefaultBackend( |
186 net::DISK_CACHE, | 187 net::DISK_CACHE, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 275 } |
275 | 276 |
276 scoped_refptr<ChromeURLRequestContext> | 277 scoped_refptr<ChromeURLRequestContext> |
277 ProfileImplIOData::AcquireExtensionsRequestContext() const { | 278 ProfileImplIOData::AcquireExtensionsRequestContext() const { |
278 DCHECK(extensions_request_context_); | 279 DCHECK(extensions_request_context_); |
279 scoped_refptr<ChromeURLRequestContext> context = extensions_request_context_; | 280 scoped_refptr<ChromeURLRequestContext> context = extensions_request_context_; |
280 extensions_request_context_->set_profile_io_data(this); | 281 extensions_request_context_->set_profile_io_data(this); |
281 extensions_request_context_ = NULL; | 282 extensions_request_context_ = NULL; |
282 return context; | 283 return context; |
283 } | 284 } |
OLD | NEW |