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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 #endif // !defined(DISABLE_FTP_SUPPORT) | 578 #endif // !defined(DISABLE_FTP_SUPPORT) |
579 | 579 |
580 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed. | 580 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed. |
581 tracked_objects::ScopedTracker tracking_profile8( | 581 tracked_objects::ScopedTracker tracking_profile8( |
582 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 582 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
583 "436671 ProfileImplIOData::InitializeInternal8")); | 583 "436671 ProfileImplIOData::InitializeInternal8")); |
584 | 584 |
585 scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory( | 585 scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory( |
586 new net::URLRequestJobFactoryImpl()); | 586 new net::URLRequestJobFactoryImpl()); |
587 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); | 587 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); |
588 | |
589 // Install the New Tab Page Interceptor. | |
590 if (profile_params->new_tab_page_interceptor.get()) { | |
591 request_interceptors.push_back( | |
592 profile_params->new_tab_page_interceptor.release()); | |
593 } | |
mmenke
2015/01/30 15:21:10
Think this would make more sense in ProfileIOData:
Mathieu
2015/01/30 16:55:16
Done.
| |
594 | |
588 // The data reduction proxy interceptor should be as close to the network | 595 // The data reduction proxy interceptor should be as close to the network |
589 // as possible. | 596 // as possible. |
590 request_interceptors.insert( | 597 request_interceptors.insert( |
591 request_interceptors.begin(), | 598 request_interceptors.begin(), |
592 data_reduction_proxy_io_data()->CreateInterceptor().release()); | 599 data_reduction_proxy_io_data()->CreateInterceptor().release()); |
593 main_job_factory_ = SetUpJobFactoryDefaults( | 600 main_job_factory_ = SetUpJobFactoryDefaults( |
594 main_job_factory.Pass(), | 601 main_job_factory.Pass(), |
595 request_interceptors.Pass(), | 602 request_interceptors.Pass(), |
596 profile_params->protocol_handler_interceptor.Pass(), | 603 profile_params->protocol_handler_interceptor.Pass(), |
597 main_context->network_delegate(), | 604 main_context->network_delegate(), |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
846 const base::Closure& completion) { | 853 const base::Closure& completion) { |
847 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 854 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
848 DCHECK(initialized()); | 855 DCHECK(initialized()); |
849 | 856 |
850 DCHECK(transport_security_state()); | 857 DCHECK(transport_security_state()); |
851 // Completes synchronously. | 858 // Completes synchronously. |
852 transport_security_state()->DeleteAllDynamicDataSince(time); | 859 transport_security_state()->DeleteAllDynamicDataSince(time); |
853 DCHECK(http_server_properties_manager_); | 860 DCHECK(http_server_properties_manager_); |
854 http_server_properties_manager_->Clear(completion); | 861 http_server_properties_manager_->Clear(completion); |
855 } | 862 } |
OLD | NEW |