Chromium Code Reviews| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 542 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); | 542 new net::FtpNetworkLayer(io_thread_globals->host_resolver.get())); |
| 543 #endif // !defined(DISABLE_FTP_SUPPORT) | 543 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 544 | 544 |
| 545 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( | 545 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( |
| 546 new net::URLRequestJobFactoryImpl()); | 546 new net::URLRequestJobFactoryImpl()); |
| 547 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); | 547 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); |
| 548 | 548 |
| 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(previews_io_data()))); |
| 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().release()); |
| 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), |
| (...skipping 244 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 } |
| 817 | |
| 818 void ProfileImplIOData::set_previews_io_data( | |
| 819 std::unique_ptr<previews::PreviewsIOData> previews_io_data) const { | |
|
tbansal1
2016/10/06 16:32:33
Can this really be a const function?
RyanSturm
2016/10/06 17:07:42
mutable. It's going away anyway.
| |
| 820 previews_io_data_ = std::move(previews_io_data); | |
| 821 } | |
| OLD | NEW |