| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 network_delegate(), | 490 network_delegate(), |
| 491 ftp_factory_.get()); | 491 ftp_factory_.get()); |
| 492 main_context->set_job_factory(main_job_factory_.get()); | 492 main_context->set_job_factory(main_job_factory_.get()); |
| 493 | 493 |
| 494 #if defined(ENABLE_EXTENSIONS) | 494 #if defined(ENABLE_EXTENSIONS) |
| 495 InitializeExtensionsRequestContext(profile_params); | 495 InitializeExtensionsRequestContext(profile_params); |
| 496 #endif | 496 #endif |
| 497 | 497 |
| 498 // Setup the SDCHManager for this profile. | 498 // Setup the SDCHManager for this profile. |
| 499 sdch_manager_.reset(new net::SdchManager); | 499 sdch_manager_.reset(new net::SdchManager); |
| 500 sdch_manager_->set_sdch_fetcher( | 500 scoped_ptr<net::SdchFetcher> fetcher(new net::SdchDictionaryFetcher( |
| 501 new net::SdchDictionaryFetcher( | 501 sdch_manager_.get(), |
| 502 sdch_manager_.get(), | 502 // SdchDictionaryFetcher takes a reference to the Getter, and |
| 503 // SdchDictionaryFetcher takes a reference to the Getter, and | 503 // hence implicitly takes ownership. |
| 504 // hence implicitly takes ownership. | 504 new net::TrivialURLRequestContextGetter( |
| 505 new net::TrivialURLRequestContextGetter( | 505 main_context, |
| 506 main_context, | 506 content::BrowserThread::GetMessageLoopProxyForThread( |
| 507 content::BrowserThread::GetMessageLoopProxyForThread( | 507 content::BrowserThread::IO)))); |
| 508 content::BrowserThread::IO)))); | 508 sdch_manager_->set_sdch_fetcher(fetcher.Pass()); |
| 509 main_context->set_sdch_manager(sdch_manager_.get()); | 509 main_context->set_sdch_manager(sdch_manager_.get()); |
| 510 | 510 |
| 511 // Create a media request context based on the main context, but using a | 511 // Create a media request context based on the main context, but using a |
| 512 // media cache. It shares the same job factory as the main context. | 512 // media cache. It shares the same job factory as the main context. |
| 513 StoragePartitionDescriptor details(profile_path_, false); | 513 StoragePartitionDescriptor details(profile_path_, false); |
| 514 media_request_context_.reset(InitializeMediaRequestContext(main_context, | 514 media_request_context_.reset(InitializeMediaRequestContext(main_context, |
| 515 details)); | 515 details)); |
| 516 | 516 |
| 517 if (domain_reliability_monitor_) { | 517 if (domain_reliability_monitor_) { |
| 518 domain_reliability_monitor_->Init( | 518 domain_reliability_monitor_->Init( |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 const base::Closure& completion) { | 751 const base::Closure& completion) { |
| 752 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 752 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 753 DCHECK(initialized()); | 753 DCHECK(initialized()); |
| 754 | 754 |
| 755 DCHECK(transport_security_state()); | 755 DCHECK(transport_security_state()); |
| 756 // Completes synchronously. | 756 // Completes synchronously. |
| 757 transport_security_state()->DeleteAllDynamicDataSince(time); | 757 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 758 DCHECK(http_server_properties_manager_); | 758 DCHECK(http_server_properties_manager_); |
| 759 http_server_properties_manager_->Clear(completion); | 759 http_server_properties_manager_->Clear(completion); |
| 760 } | 760 } |
| OLD | NEW |