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

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

Issue 2717523004: Revert of Use the loading task runner for mojo-loading (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | content/child/url_loader_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 pending_requests_[request_id] = base::MakeUnique<PendingRequestInfo>( 661 pending_requests_[request_id] = base::MakeUnique<PendingRequestInfo>(
662 std::move(peer), request->resource_type, request->origin_pid, 662 std::move(peer), request->resource_type, request->origin_pid,
663 frame_origin, request->url, request->download_to_file); 663 frame_origin, request->url, request->download_to_file);
664 664
665 if (resource_scheduling_filter_.get() && loading_task_runner) { 665 if (resource_scheduling_filter_.get() && loading_task_runner) {
666 resource_scheduling_filter_->SetRequestIdTaskRunner(request_id, 666 resource_scheduling_filter_->SetRequestIdTaskRunner(request_id,
667 loading_task_runner); 667 loading_task_runner);
668 } 668 }
669 669
670 if (ipc_type == blink::WebURLRequest::LoadingIPCType::Mojo) { 670 if (ipc_type == blink::WebURLRequest::LoadingIPCType::Mojo) {
671 scoped_refptr<base::SingleThreadTaskRunner> task_runner =
672 loading_task_runner ? loading_task_runner : main_thread_task_runner_;
673 std::unique_ptr<URLLoaderClientImpl> client( 671 std::unique_ptr<URLLoaderClientImpl> client(
674 new URLLoaderClientImpl(request_id, this, std::move(task_runner))); 672 new URLLoaderClientImpl(request_id, this, main_thread_task_runner_));
675 mojom::URLLoaderAssociatedPtr url_loader; 673 mojom::URLLoaderAssociatedPtr url_loader;
676 mojom::URLLoaderClientAssociatedPtrInfo client_ptr_info; 674 mojom::URLLoaderClientAssociatedPtrInfo client_ptr_info;
677 client->Bind(&client_ptr_info); 675 client->Bind(&client_ptr_info);
678 url_loader_factory->CreateLoaderAndStart(MakeRequest(&url_loader), 676 url_loader_factory->CreateLoaderAndStart(MakeRequest(&url_loader),
679 routing_id, request_id, *request, 677 routing_id, request_id, *request,
680 std::move(client_ptr_info)); 678 std::move(client_ptr_info));
681 pending_requests_[request_id]->url_loader = std::move(url_loader); 679 pending_requests_[request_id]->url_loader = std::move(url_loader);
682 pending_requests_[request_id]->url_loader_client = std::move(client); 680 pending_requests_[request_id]->url_loader_client = std::move(client);
683 } else { 681 } else {
684 message_sender_->Send( 682 message_sender_->Send(
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 delete message; 820 delete message;
823 } 821 }
824 } 822 }
825 823
826 void ResourceDispatcher::SetResourceSchedulingFilter( 824 void ResourceDispatcher::SetResourceSchedulingFilter(
827 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 825 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
828 resource_scheduling_filter_ = resource_scheduling_filter; 826 resource_scheduling_filter_ = resource_scheduling_filter;
829 } 827 }
830 828
831 } // namespace content 829 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/url_loader_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698