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

Side by Side Diff: content/child/resource_dispatcher.cc

Issue 2390983002: Provide route ID via URLLoaderFactory (Closed)
Patch Set: fix Created 4 years, 2 months 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
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/child/resource_dispatcher.h" 7 #include "content/child/resource_dispatcher.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 if (resource_scheduling_filter_.get() && loading_task_runner) { 657 if (resource_scheduling_filter_.get() && loading_task_runner) {
658 resource_scheduling_filter_->SetRequestIdTaskRunner(request_id, 658 resource_scheduling_filter_->SetRequestIdTaskRunner(request_id,
659 loading_task_runner); 659 loading_task_runner);
660 } 660 }
661 661
662 if (ipc_type == blink::WebURLRequest::LoadingIPCType::Mojo) { 662 if (ipc_type == blink::WebURLRequest::LoadingIPCType::Mojo) {
663 std::unique_ptr<URLLoaderClientImpl> client( 663 std::unique_ptr<URLLoaderClientImpl> client(
664 new URLLoaderClientImpl(request_id, this, main_thread_task_runner_)); 664 new URLLoaderClientImpl(request_id, this, main_thread_task_runner_));
665 mojom::URLLoaderPtr url_loader; 665 mojom::URLLoaderPtr url_loader;
666 url_loader_factory->CreateLoaderAndStart( 666 url_loader_factory->CreateLoaderAndStart(
667 GetProxy(&url_loader), request_id, *request, 667 GetProxy(&url_loader), routing_id, request_id, *request,
668 client->CreateInterfacePtrAndBind()); 668 client->CreateInterfacePtrAndBind());
669 pending_requests_[request_id]->url_loader = std::move(url_loader); 669 pending_requests_[request_id]->url_loader = std::move(url_loader);
670 pending_requests_[request_id]->url_loader_client = std::move(client); 670 pending_requests_[request_id]->url_loader_client = std::move(client);
671 } else { 671 } else {
672 message_sender_->Send( 672 message_sender_->Send(
673 new ResourceHostMsg_RequestResource(routing_id, request_id, *request)); 673 new ResourceHostMsg_RequestResource(routing_id, request_id, *request));
674 } 674 }
675 675
676 return request_id; 676 return request_id;
677 } 677 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 delete message; 810 delete message;
811 } 811 }
812 } 812 }
813 813
814 void ResourceDispatcher::SetResourceSchedulingFilter( 814 void ResourceDispatcher::SetResourceSchedulingFilter(
815 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 815 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
816 resource_scheduling_filter_ = resource_scheduling_filter; 816 resource_scheduling_filter_ = resource_scheduling_filter;
817 } 817 }
818 818
819 } // namespace content 819 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/url_loader_factory_impl_unittest.cc ('k') | content/common/url_loader_factory.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698