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 <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 // Install the Offline Page Interceptor. | 549 // Install the Offline Page Interceptor. |
550 #if defined(OS_ANDROID) | 550 #if defined(OS_ANDROID) |
551 request_interceptors.push_back(std::unique_ptr<net::URLRequestInterceptor>( | 551 request_interceptors.push_back(std::unique_ptr<net::URLRequestInterceptor>( |
552 new offline_pages::OfflinePageRequestInterceptor())); | 552 new offline_pages::OfflinePageRequestInterceptor())); |
553 #endif | 553 #endif |
554 | 554 |
555 // The data reduction proxy interceptor should be as close to the network | 555 // The data reduction proxy interceptor should be as close to the network |
556 // as possible. | 556 // as possible. |
557 request_interceptors.insert( | 557 request_interceptors.insert( |
558 request_interceptors.begin(), | 558 request_interceptors.begin(), |
559 data_reduction_proxy_io_data()->CreateInterceptor().release()); | 559 data_reduction_proxy_io_data()->CreateInterceptor()); |
560 main_job_factory_ = SetUpJobFactoryDefaults( | 560 main_job_factory_ = SetUpJobFactoryDefaults( |
561 std::move(main_job_factory), std::move(request_interceptors), | 561 std::move(main_job_factory), std::move(request_interceptors), |
562 std::move(profile_params->protocol_handler_interceptor), | 562 std::move(profile_params->protocol_handler_interceptor), |
563 main_context->network_delegate(), ftp_factory_.get()); | 563 main_context->network_delegate(), ftp_factory_.get()); |
564 main_context->set_job_factory(main_job_factory_.get()); | 564 main_context->set_job_factory(main_job_factory_.get()); |
565 main_context->set_network_quality_estimator( | 565 main_context->set_network_quality_estimator( |
566 io_thread_globals->network_quality_estimator.get()); | 566 io_thread_globals->network_quality_estimator.get()); |
567 | 567 |
568 #if defined(ENABLE_EXTENSIONS) | 568 #if defined(ENABLE_EXTENSIONS) |
569 InitializeExtensionsRequestContext(profile_params); | 569 InitializeExtensionsRequestContext(profile_params); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 context->SetCookieStore(std::move(cookie_store)); | 700 context->SetCookieStore(std::move(cookie_store)); |
701 context->SetHttpTransactionFactory(std::move(app_http_cache)); | 701 context->SetHttpTransactionFactory(std::move(app_http_cache)); |
702 | 702 |
703 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( | 703 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( |
704 new net::URLRequestJobFactoryImpl()); | 704 new net::URLRequestJobFactoryImpl()); |
705 InstallProtocolHandlers(job_factory.get(), protocol_handlers); | 705 InstallProtocolHandlers(job_factory.get(), protocol_handlers); |
706 // The data reduction proxy interceptor should be as close to the network | 706 // The data reduction proxy interceptor should be as close to the network |
707 // as possible. | 707 // as possible. |
708 request_interceptors.insert( | 708 request_interceptors.insert( |
709 request_interceptors.begin(), | 709 request_interceptors.begin(), |
710 data_reduction_proxy_io_data()->CreateInterceptor().release()); | 710 data_reduction_proxy_io_data()->CreateInterceptor()); |
711 std::unique_ptr<net::URLRequestJobFactory> top_job_factory( | 711 std::unique_ptr<net::URLRequestJobFactory> top_job_factory( |
712 SetUpJobFactoryDefaults( | 712 SetUpJobFactoryDefaults( |
713 std::move(job_factory), std::move(request_interceptors), | 713 std::move(job_factory), std::move(request_interceptors), |
714 std::move(protocol_handler_interceptor), | 714 std::move(protocol_handler_interceptor), |
715 main_context->network_delegate(), ftp_factory_.get())); | 715 main_context->network_delegate(), ftp_factory_.get())); |
716 context->SetJobFactory(std::move(top_job_factory)); | 716 context->SetJobFactory(std::move(top_job_factory)); |
717 | 717 |
718 return context; | 718 return context; |
719 } | 719 } |
720 | 720 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 const base::Closure& completion) { | 807 const base::Closure& completion) { |
808 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 808 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
809 DCHECK(initialized()); | 809 DCHECK(initialized()); |
810 | 810 |
811 DCHECK(transport_security_state()); | 811 DCHECK(transport_security_state()); |
812 // Completes synchronously. | 812 // Completes synchronously. |
813 transport_security_state()->DeleteAllDynamicDataSince(time); | 813 transport_security_state()->DeleteAllDynamicDataSince(time); |
814 DCHECK(http_server_properties_manager_); | 814 DCHECK(http_server_properties_manager_); |
815 http_server_properties_manager_->Clear(completion); | 815 http_server_properties_manager_->Clear(completion); |
816 } | 816 } |
OLD | NEW |