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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 if (pending_frame_host) | 486 if (pending_frame_host) |
| 487 routing_ids->insert(pending_frame_host->GetGlobalFrameRoutingId()); | 487 routing_ids->insert(pending_frame_host->GetGlobalFrameRoutingId()); |
| 488 } | 488 } |
| 489 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 489 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 490 base::Bind(&NotifyForRouteSetOnIO, frame_callback, | 490 base::Bind(&NotifyForRouteSetOnIO, frame_callback, |
| 491 base::Passed(std::move(routing_ids)))); | 491 base::Passed(std::move(routing_ids)))); |
| 492 } | 492 } |
| 493 | 493 |
| 494 } // namespace | 494 } // namespace |
| 495 | 495 |
| 496 LoaderIOThreadNotifier::LoaderIOThreadNotifier(WebContents* web_contents) | |
| 497 : WebContentsObserver(web_contents) {} | |
| 498 | |
| 499 LoaderIOThreadNotifier::~LoaderIOThreadNotifier() {} | |
| 500 | |
| 501 void LoaderIOThreadNotifier::RenderFrameDeleted( | |
| 502 RenderFrameHost* render_frame_host) { | |
| 503 NotifyForRouteFromUI( | |
| 504 static_cast<RenderFrameHostImpl*>(render_frame_host) | |
| 505 ->GetGlobalFrameRoutingId(), | |
| 506 base::Bind(&ResourceDispatcherHostImpl::OnRenderFrameDeleted)); | |
| 507 } | |
| 508 | |
| 509 // static | 496 // static |
| 510 ResourceDispatcherHost* ResourceDispatcherHost::Get() { | 497 ResourceDispatcherHost* ResourceDispatcherHost::Get() { |
| 511 return g_resource_dispatcher_host; | 498 return g_resource_dispatcher_host; |
| 512 } | 499 } |
| 513 | 500 |
| 514 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl() | 501 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl() |
| 515 : save_file_manager_(new SaveFileManager()), | 502 : save_file_manager_(new SaveFileManager()), |
| 516 request_id_(-1), | 503 request_id_(-1), |
| 517 is_shutdown_(false), | 504 is_shutdown_(false), |
| 518 num_in_flight_requests_(0), | 505 num_in_flight_requests_(0), |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1819 context, | 1806 context, |
| 1820 base::WeakPtr<ResourceMessageFilter>(), // filter | 1807 base::WeakPtr<ResourceMessageFilter>(), // filter |
| 1821 false, // report_raw_headers | 1808 false, // report_raw_headers |
| 1822 true, // is_async | 1809 true, // is_async |
| 1823 false, // is_using_lofi | 1810 false, // is_using_lofi |
| 1824 std::string(), // original_headers | 1811 std::string(), // original_headers |
| 1825 nullptr, // body | 1812 nullptr, // body |
| 1826 false); // initiated_in_secure_context | 1813 false); // initiated_in_secure_context |
| 1827 } | 1814 } |
| 1828 | 1815 |
| 1829 void ResourceDispatcherHostImpl::OnRenderFrameDeleted( | 1816 void ResourceDispatcherHostImpl::OnRenderFrameDeleted( |
|
mmenke
2016/07/29 20:30:12
Should try and match declaration order with defini
Charlie Harrison
2016/07/29 20:35:34
Moved it after SetLoaderDelegate. I wonder if we c
| |
| 1830 const GlobalFrameRoutingId& global_routing_id) { | 1817 const GlobalFrameRoutingId& global_routing_id) { |
| 1831 CancelRequestsForRoute(global_routing_id); | 1818 CancelRequestsForRoute(global_routing_id); |
| 1832 } | 1819 } |
| 1833 | 1820 |
| 1834 void ResourceDispatcherHostImpl::OnRenderViewHostCreated(int child_id, | 1821 void ResourceDispatcherHostImpl::OnRenderViewHostCreated(int child_id, |
| 1835 int route_id) { | 1822 int route_id) { |
| 1836 scheduler_->OnClientCreated(child_id, route_id); | 1823 scheduler_->OnClientCreated(child_id, route_id); |
| 1837 } | 1824 } |
| 1838 | 1825 |
| 1839 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(int child_id, | 1826 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(int child_id, |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2614 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2601 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
| 2615 response->head.security_info = SerializeSecurityInfo(ssl); | 2602 response->head.security_info = SerializeSecurityInfo(ssl); |
| 2616 } | 2603 } |
| 2617 | 2604 |
| 2618 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2605 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
| 2619 return cert_store_for_testing_ ? cert_store_for_testing_ | 2606 return cert_store_for_testing_ ? cert_store_for_testing_ |
| 2620 : CertStore::GetInstance(); | 2607 : CertStore::GetInstance(); |
| 2621 } | 2608 } |
| 2622 | 2609 |
| 2623 } // namespace content | 2610 } // namespace content |
| OLD | NEW |