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

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

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « content/child/request_info.cc ('k') | content/child/resource_scheduling_filter.h » ('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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 GURL frame_origin; 584 GURL frame_origin;
585 std::unique_ptr<ResourceRequest> request = 585 std::unique_ptr<ResourceRequest> request =
586 CreateRequest(request_info, request_body, &frame_origin); 586 CreateRequest(request_info, request_body, &frame_origin);
587 587
588 // Compute a unique request_id for this renderer process. 588 // Compute a unique request_id for this renderer process.
589 int request_id = MakeRequestID(); 589 int request_id = MakeRequestID();
590 pending_requests_[request_id] = base::WrapUnique(new PendingRequestInfo( 590 pending_requests_[request_id] = base::WrapUnique(new PendingRequestInfo(
591 std::move(peer), request->resource_type, request->origin_pid, 591 std::move(peer), request->resource_type, request->origin_pid,
592 frame_origin, request->url, request_info.download_to_file)); 592 frame_origin, request->url, request_info.download_to_file));
593 593
594 if (resource_scheduling_filter_.get() && 594 if (resource_scheduling_filter_.get() && request_info.loading_task_runner) {
595 request_info.loading_web_task_runner) {
596 resource_scheduling_filter_->SetRequestIdTaskRunner( 595 resource_scheduling_filter_->SetRequestIdTaskRunner(
597 request_id, 596 request_id, request_info.loading_task_runner);
598 request_info.loading_web_task_runner->clone());
599 } 597 }
600 598
601 message_sender_->Send(new ResourceHostMsg_RequestResource( 599 message_sender_->Send(new ResourceHostMsg_RequestResource(
602 request_info.routing_id, request_id, *request)); 600 request_info.routing_id, request_id, *request));
603 601
604 return request_id; 602 return request_id;
605 } 603 }
606 604
607 void ResourceDispatcher::ToResourceResponseInfo( 605 void ResourceDispatcher::ToResourceResponseInfo(
608 const PendingRequestInfo& request_info, 606 const PendingRequestInfo& request_info,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 *frame_origin = extra_data->frame_origin(); 812 *frame_origin = extra_data->frame_origin();
815 return request; 813 return request;
816 } 814 }
817 815
818 void ResourceDispatcher::SetResourceSchedulingFilter( 816 void ResourceDispatcher::SetResourceSchedulingFilter(
819 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 817 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
820 resource_scheduling_filter_ = resource_scheduling_filter; 818 resource_scheduling_filter_ = resource_scheduling_filter;
821 } 819 }
822 820
823 } // namespace content 821 } // namespace content
OLDNEW
« no previous file with comments | « content/child/request_info.cc ('k') | content/child/resource_scheduling_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698