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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 94503003: Split ResourceDispatcherHostImpl::BeginRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed #2 Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 5f6733d584e6de7ba9ad4b8319994a2620a0ebc0..9bed00d9996dbe9c9eb1000bac58d211a831f51c 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1131,6 +1131,23 @@ void ResourceDispatcherHostImpl::BeginRequest(
request, filter_->appcache_service(), child_id,
request_data.appcache_host_id, request_data.resource_type);
+ scoped_ptr<ResourceHandler> handler(
+ CreateResourceHandler(
+ request,
+ request_data, sync_result, route_id, process_type, child_id,
+ resource_context));
+
+ BeginRequestInternal(new_request.Pass(), handler.Pass());
+}
+
+scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::CreateResourceHandler(
+ net::URLRequest* request,
+ const ResourceHostMsg_Request& request_data,
+ IPC::Message* sync_result,
+ int route_id,
+ int process_type,
+ int child_id,
+ ResourceContext* resource_context) {
// Construct the IPC resource handler.
scoped_ptr<ResourceHandler> handler;
if (sync_result) {
@@ -1185,7 +1202,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
handler.reset(
new ThrottlingResourceHandler(handler.Pass(), request, throttles.Pass()));
- BeginRequestInternal(new_request.Pass(), handler.Pass());
+ return handler.Pass();
}
void ResourceDispatcherHostImpl::OnReleaseDownloadedFile(int request_id) {
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698