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

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

Issue 2893233002: Network traffic annotation added to URLLoaderImpl. (Closed)
Patch Set: Changed ParamTraits to StructTraits. Created 3 years, 6 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 664
665 if (ipc_type == blink::WebURLRequest::LoadingIPCType::kMojo) { 665 if (ipc_type == blink::WebURLRequest::LoadingIPCType::kMojo) {
666 scoped_refptr<base::SingleThreadTaskRunner> task_runner = 666 scoped_refptr<base::SingleThreadTaskRunner> task_runner =
667 loading_task_runner ? loading_task_runner : thread_task_runner_; 667 loading_task_runner ? loading_task_runner : thread_task_runner_;
668 std::unique_ptr<URLLoaderClientImpl> client( 668 std::unique_ptr<URLLoaderClientImpl> client(
669 new URLLoaderClientImpl(request_id, this, std::move(task_runner))); 669 new URLLoaderClientImpl(request_id, this, std::move(task_runner)));
670 std::unique_ptr<ThrottlingURLLoader> url_loader = 670 std::unique_ptr<ThrottlingURLLoader> url_loader =
671 ThrottlingURLLoader::CreateLoaderAndStart( 671 ThrottlingURLLoader::CreateLoaderAndStart(
672 url_loader_factory, std::move(throttles), routing_id, request_id, 672 url_loader_factory, std::move(throttles), routing_id, request_id,
673 mojom::kURLLoadOptionNone, std::move(request), client.get()); 673 mojom::kURLLoadOptionNone, std::move(request), client.get(),
674 net::MutableNetworkTrafficAnnotationTag(NO_TRAFFIC_ANNOTATION_YET));
674 pending_requests_[request_id]->url_loader = std::move(url_loader); 675 pending_requests_[request_id]->url_loader = std::move(url_loader);
675 pending_requests_[request_id]->url_loader_client = std::move(client); 676 pending_requests_[request_id]->url_loader_client = std::move(client);
676 } else { 677 } else {
677 message_sender_->Send( 678 message_sender_->Send(
678 new ResourceHostMsg_RequestResource(routing_id, request_id, *request)); 679 new ResourceHostMsg_RequestResource(routing_id, request_id, *request));
679 } 680 }
680 681
681 return request_id; 682 return request_id;
682 } 683 }
683 684
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 delete message; 846 delete message;
846 } 847 }
847 } 848 }
848 849
849 void ResourceDispatcher::SetResourceSchedulingFilter( 850 void ResourceDispatcher::SetResourceSchedulingFilter(
850 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { 851 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
851 resource_scheduling_filter_ = resource_scheduling_filter; 852 resource_scheduling_filter_ = resource_scheduling_filter;
852 } 853 }
853 854
854 } // namespace content 855 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698