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