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/renderer_host/resource_dispatcher_host_impl.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
652 if (delegate_ && !delegate_->AcceptSSLClientCertificateRequest( | 652 if (delegate_ && !delegate_->AcceptSSLClientCertificateRequest( |
653 loader->request(), cert_info)) { | 653 loader->request(), cert_info)) { |
654 return false; | 654 return false; |
655 } | 655 } |
656 | 656 |
657 return true; | 657 return true; |
658 } | 658 } |
659 | 659 |
660 bool ResourceDispatcherHostImpl::HandleExternalProtocol(ResourceLoader* loader, | 660 bool ResourceDispatcherHostImpl::HandleExternalProtocol(ResourceLoader* loader, |
661 const GURL& url) { | 661 const GURL& url) { |
662 #if defined OS(ANDROID) | |
663 return false; | |
joth
2012/10/24 18:47:55
Did you mean this? you've changed delegate_->Handl
mkosiba (inactive)
2012/10/25 09:02:12
Do what Joth says ;)
John Knottenbelt
2012/10/25 16:17:27
Yes, I agree. Sorry, this was accidentally left in
| |
664 #endif | |
665 | |
662 if (!delegate_) | 666 if (!delegate_) |
663 return false; | 667 return false; |
664 | 668 |
665 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); | 669 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); |
666 | 670 |
667 if (!ResourceType::IsFrame(info->GetResourceType())) | 671 if (!ResourceType::IsFrame(info->GetResourceType())) |
668 return false; | 672 return false; |
669 | 673 |
670 const net::URLRequestJobFactory* job_factory = | 674 const net::URLRequestJobFactory* job_factory = |
671 info->GetContext()->GetRequestContext()->job_factory(); | 675 info->GetContext()->GetRequestContext()->job_factory(); |
672 if (job_factory->IsHandledURL(url)) | 676 if (job_factory->IsHandledURL(url)) |
673 return false; | 677 return false; |
674 | 678 |
675 delegate_->HandleExternalProtocol(url, info->GetChildID(), | 679 delegate_->HandleExternalProtocol(url, info->GetChildID(), |
676 info->GetRouteID()); | 680 info->GetRouteID()); |
681 | |
677 return true; | 682 return true; |
678 } | 683 } |
679 | 684 |
680 void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) { | 685 void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) { |
681 // Make sure we have the load state monitor running | 686 // Make sure we have the load state monitor running |
682 if (!update_load_states_timer_->IsRunning()) { | 687 if (!update_load_states_timer_->IsRunning()) { |
683 update_load_states_timer_->Start(FROM_HERE, | 688 update_load_states_timer_->Start(FROM_HERE, |
684 TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), | 689 TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), |
685 this, &ResourceDispatcherHostImpl::UpdateLoadStates); | 690 this, &ResourceDispatcherHostImpl::UpdateLoadStates); |
686 } | 691 } |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1722 | 1727 |
1723 return i->second.get(); | 1728 return i->second.get(); |
1724 } | 1729 } |
1725 | 1730 |
1726 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, | 1731 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, |
1727 int request_id) const { | 1732 int request_id) const { |
1728 return GetLoader(GlobalRequestID(child_id, request_id)); | 1733 return GetLoader(GlobalRequestID(child_id, request_id)); |
1729 } | 1734 } |
1730 | 1735 |
1731 } // namespace content | 1736 } // namespace content |
OLD | NEW |