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