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

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

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

Powered by Google App Engine
This is Rietveld 408576698