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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 network_delegate(), | 565 network_delegate(), |
566 ftp_factory_.get()); | 566 ftp_factory_.get()); |
567 main_context->set_job_factory(main_job_factory_.get()); | 567 main_context->set_job_factory(main_job_factory_.get()); |
568 | 568 |
569 #if defined(ENABLE_EXTENSIONS) | 569 #if defined(ENABLE_EXTENSIONS) |
570 InitializeExtensionsRequestContext(profile_params); | 570 InitializeExtensionsRequestContext(profile_params); |
571 #endif | 571 #endif |
572 | 572 |
573 // Setup the SDCHManager for this profile. | 573 // Setup the SDCHManager for this profile. |
574 sdch_manager_.reset(new net::SdchManager); | 574 sdch_manager_.reset(new net::SdchManager); |
575 sdch_manager_->set_sdch_fetcher( | 575 |
576 new net::SdchDictionaryFetcher( | 576 scoped_refptr<net::URLRequestContextGetter> getter( |
577 sdch_manager_.get(), | 577 new net::TrivialURLRequestContextGetter( |
578 // SdchDictionaryFetcher takes a reference to the Getter, and | 578 main_context, |
579 // hence implicitly takes ownership. | 579 content::BrowserThread::GetMessageLoopProxyForThread( |
580 new net::TrivialURLRequestContextGetter( | 580 content::BrowserThread::IO))); |
581 main_context, | 581 |
582 content::BrowserThread::GetMessageLoopProxyForThread( | 582 sdch_manager_->set_sdch_fetcher(scoped_ptr<net::SdchFetcher>( |
583 content::BrowserThread::IO)))); | 583 new net::SdchDictionaryFetcher(sdch_manager_.get(), getter)).Pass()); |
| 584 |
584 main_context->set_sdch_manager(sdch_manager_.get()); | 585 main_context->set_sdch_manager(sdch_manager_.get()); |
585 | 586 |
586 // Create a media request context based on the main context, but using a | 587 // Create a media request context based on the main context, but using a |
587 // media cache. It shares the same job factory as the main context. | 588 // media cache. It shares the same job factory as the main context. |
588 StoragePartitionDescriptor details(profile_path_, false); | 589 StoragePartitionDescriptor details(profile_path_, false); |
589 media_request_context_.reset(InitializeMediaRequestContext(main_context, | 590 media_request_context_.reset(InitializeMediaRequestContext(main_context, |
590 details)); | 591 details)); |
591 | 592 |
592 if (domain_reliability_monitor_) { | 593 if (domain_reliability_monitor_) { |
593 domain_reliability_monitor_->Init( | 594 domain_reliability_monitor_->Init( |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 const base::Closure& completion) { | 827 const base::Closure& completion) { |
827 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 828 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
828 DCHECK(initialized()); | 829 DCHECK(initialized()); |
829 | 830 |
830 DCHECK(transport_security_state()); | 831 DCHECK(transport_security_state()); |
831 // Completes synchronously. | 832 // Completes synchronously. |
832 transport_security_state()->DeleteAllDynamicDataSince(time); | 833 transport_security_state()->DeleteAllDynamicDataSince(time); |
833 DCHECK(http_server_properties_manager_); | 834 DCHECK(http_server_properties_manager_); |
834 http_server_properties_manager_->Clear(completion); | 835 http_server_properties_manager_->Clear(completion); |
835 } | 836 } |
OLD | NEW |