| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 BrowserThread::GetBlockingPool()->GetSequenceToken()), | 514 BrowserThread::GetBlockingPool()->GetSequenceToken()), |
| 515 lazy_params_->special_storage_policy.get()); | 515 lazy_params_->special_storage_policy.get()); |
| 516 channel_id_service = new net::ChannelIDService( | 516 channel_id_service = new net::ChannelIDService( |
| 517 new net::DefaultChannelIDStore(channel_id_db.get()), | 517 new net::DefaultChannelIDStore(channel_id_db.get()), |
| 518 base::WorkerPool::GetTaskRunner(true)); | 518 base::WorkerPool::GetTaskRunner(true)); |
| 519 } | 519 } |
| 520 | 520 |
| 521 set_channel_id_service(channel_id_service); | 521 set_channel_id_service(channel_id_service); |
| 522 main_context->set_channel_id_service(channel_id_service); | 522 main_context->set_channel_id_service(channel_id_service); |
| 523 | 523 |
| 524 { | 524 scoped_ptr<net::HttpCache::BackendFactory> main_backend( |
| 525 // TODO(ttuttle): Remove ScopedTracker below once crbug.com/436671 is fixed. | 525 new net::HttpCache::DefaultBackend( |
| 526 tracked_objects::ScopedTracker tracking_profile( | 526 net::DISK_CACHE, |
| 527 FROM_HERE_WITH_EXPLICIT_FUNCTION("436671 HttpCache construction")); | 527 ChooseCacheBackendType(), |
| 528 scoped_ptr<net::HttpCache::BackendFactory> main_backend( | 528 lazy_params_->cache_path, |
| 529 new net::HttpCache::DefaultBackend( | 529 lazy_params_->cache_max_size, |
| 530 net::DISK_CACHE, | 530 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); |
| 531 ChooseCacheBackendType(), | 531 http_network_session_ = CreateHttpNetworkSession(*profile_params); |
| 532 lazy_params_->cache_path, | 532 main_http_factory_ = CreateMainHttpFactory(http_network_session_.get(), |
| 533 lazy_params_->cache_max_size, | 533 main_backend.Pass()); |
| 534 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); | |
| 535 http_network_session_ = CreateHttpNetworkSession(*profile_params); | |
| 536 main_http_factory_ = CreateMainHttpFactory(http_network_session_.get(), | |
| 537 main_backend.Pass()); | |
| 538 } | |
| 539 | |
| 540 main_context->set_http_transaction_factory(main_http_factory_.get()); | 534 main_context->set_http_transaction_factory(main_http_factory_.get()); |
| 541 | 535 |
| 542 #if !defined(DISABLE_FTP_SUPPORT) | 536 #if !defined(DISABLE_FTP_SUPPORT) |
| 543 ftp_factory_.reset( | 537 ftp_factory_.reset( |
| 544 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); | 538 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); |
| 545 #endif // !defined(DISABLE_FTP_SUPPORT) | 539 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 546 | 540 |
| 547 scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory( | 541 scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory( |
| 548 new net::URLRequestJobFactoryImpl()); | 542 new net::URLRequestJobFactoryImpl()); |
| 549 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); | 543 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 const base::Closure& completion) { | 784 const base::Closure& completion) { |
| 791 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 785 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 792 DCHECK(initialized()); | 786 DCHECK(initialized()); |
| 793 | 787 |
| 794 DCHECK(transport_security_state()); | 788 DCHECK(transport_security_state()); |
| 795 // Completes synchronously. | 789 // Completes synchronously. |
| 796 transport_security_state()->DeleteAllDynamicDataSince(time); | 790 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 797 DCHECK(http_server_properties_manager_); | 791 DCHECK(http_server_properties_manager_); |
| 798 http_server_properties_manager_->Clear(completion); | 792 http_server_properties_manager_->Clear(completion); |
| 799 } | 793 } |
| OLD | NEW |