Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 11265013: [Android] Use resource throttle instead of HandleExternalProtocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android webview compilation error (adjust header). Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); 665 ResourceRequestInfoImpl* info = loader->GetRequestInfo();
666 666
667 if (!ResourceType::IsFrame(info->GetResourceType())) 667 if (!ResourceType::IsFrame(info->GetResourceType()))
668 return false; 668 return false;
669 669
670 const net::URLRequestJobFactory* job_factory = 670 const net::URLRequestJobFactory* job_factory =
671 info->GetContext()->GetRequestContext()->job_factory(); 671 info->GetContext()->GetRequestContext()->job_factory();
672 if (job_factory->IsHandledURL(url)) 672 if (job_factory->IsHandledURL(url))
673 return false; 673 return false;
674 674
675 delegate_->HandleExternalProtocol(url, info->GetChildID(), 675 return delegate_->HandleExternalProtocol(url, info->GetChildID(),
676 info->GetRouteID()); 676 info->GetRouteID());
677 return true;
678 } 677 }
679 678
680 void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) { 679 void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) {
681 // Make sure we have the load state monitor running 680 // Make sure we have the load state monitor running
682 if (!update_load_states_timer_->IsRunning()) { 681 if (!update_load_states_timer_->IsRunning()) {
683 update_load_states_timer_->Start(FROM_HERE, 682 update_load_states_timer_->Start(FROM_HERE,
684 TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), 683 TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec),
685 this, &ResourceDispatcherHostImpl::UpdateLoadStates); 684 this, &ResourceDispatcherHostImpl::UpdateLoadStates);
686 } 685 }
687 } 686 }
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 1721
1723 return i->second.get(); 1722 return i->second.get();
1724 } 1723 }
1725 1724
1726 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1725 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1727 int request_id) const { 1726 int request_id) const {
1728 return GetLoader(GlobalRequestID(child_id, request_id)); 1727 return GetLoader(GlobalRequestID(child_id, request_id));
1729 } 1728 }
1730 1729
1731 } // namespace content 1730 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698