| OLD | NEW | 
|    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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  659                                      weak_factory_.GetWeakPtr(), request_id, |  659                                      weak_factory_.GetWeakPtr(), request_id, | 
|  660                                      base::Passed(std::move(consumer_handle)))); |  660                                      base::Passed(std::move(consumer_handle)))); | 
|  661  |  661  | 
|  662     return request_id; |  662     return request_id; | 
|  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, 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             std::move(task_runner)); | 
 |  675     ; | 
|  674     pending_requests_[request_id]->url_loader = std::move(url_loader); |  676     pending_requests_[request_id]->url_loader = std::move(url_loader); | 
|  675     pending_requests_[request_id]->url_loader_client = std::move(client); |  677     pending_requests_[request_id]->url_loader_client = std::move(client); | 
|  676   } else { |  678   } else { | 
|  677     message_sender_->Send( |  679     message_sender_->Send( | 
|  678         new ResourceHostMsg_RequestResource(routing_id, request_id, *request)); |  680         new ResourceHostMsg_RequestResource(routing_id, request_id, *request)); | 
|  679   } |  681   } | 
|  680  |  682  | 
|  681   return request_id; |  683   return request_id; | 
|  682 } |  684 } | 
|  683  |  685  | 
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  845     delete message; |  847     delete message; | 
|  846   } |  848   } | 
|  847 } |  849 } | 
|  848  |  850  | 
|  849 void ResourceDispatcher::SetResourceSchedulingFilter( |  851 void ResourceDispatcher::SetResourceSchedulingFilter( | 
|  850     scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { |  852     scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { | 
|  851   resource_scheduling_filter_ = resource_scheduling_filter; |  853   resource_scheduling_filter_ = resource_scheduling_filter; | 
|  852 } |  854 } | 
|  853  |  855  | 
|  854 }  // namespace content |  856 }  // namespace content | 
| OLD | NEW |