| 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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
| 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
| 7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
| 8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
| 9 // | 9 // |
| 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 ResourceRequesterInfo* requester_info, | 590 ResourceRequesterInfo* requester_info, |
| 591 net::URLRequest* request, | 591 net::URLRequest* request, |
| 592 const ResourceRequest& request_data, | 592 const ResourceRequest& request_data, |
| 593 const SyncLoadResultCallback& sync_result_handler, | 593 const SyncLoadResultCallback& sync_result_handler, |
| 594 int route_id, | 594 int route_id, |
| 595 int child_id, | 595 int child_id, |
| 596 ResourceContext* resource_context, | 596 ResourceContext* resource_context, |
| 597 mojom::URLLoaderAssociatedRequest mojo_request, | 597 mojom::URLLoaderAssociatedRequest mojo_request, |
| 598 mojom::URLLoaderClientPtr url_loader_client); | 598 mojom::URLLoaderClientPtr url_loader_client); |
| 599 | 599 |
| 600 // Creates either MojoAsyncResourceHandler or AsyncResourceHandler. |
| 601 std::unique_ptr<ResourceHandler> CreateBaseResourceHandler( |
| 602 net::URLRequest* request, |
| 603 mojom::URLLoaderAssociatedRequest mojo_request, |
| 604 mojom::URLLoaderClientPtr url_loader_client, |
| 605 ResourceType resource_type); |
| 606 |
| 600 // Wraps |handler| in the standard resource handlers for normal resource | 607 // Wraps |handler| in the standard resource handlers for normal resource |
| 601 // loading and navigation requests. This adds MimeTypeResourceHandler and | 608 // loading and navigation requests. This adds MimeTypeResourceHandler and |
| 602 // ResourceThrottles. | 609 // ResourceThrottles. |
| 603 // PlzNavigate: |navigation_loader_core| and |stream_handle| are used to | 610 // PlzNavigate: |navigation_loader_core| and |stream_handle| are used to |
| 604 // properly initialized the NavigationResourceHandler placed in navigation | 611 // properly initialized the NavigationResourceHandler placed in navigation |
| 605 // requests. They should be non-null in that case. | 612 // requests. They should be non-null in that case. |
| 606 std::unique_ptr<ResourceHandler> AddStandardHandlers( | 613 std::unique_ptr<ResourceHandler> AddStandardHandlers( |
| 607 net::URLRequest* request, | 614 net::URLRequest* request, |
| 608 ResourceType resource_type, | 615 ResourceType resource_type, |
| 609 ResourceContext* resource_context, | 616 ResourceContext* resource_context, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 791 |
| 785 // Task runner for the IO thead. | 792 // Task runner for the IO thead. |
| 786 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 793 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
| 787 | 794 |
| 788 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 795 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 789 }; | 796 }; |
| 790 | 797 |
| 791 } // namespace content | 798 } // namespace content |
| 792 | 799 |
| 793 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 800 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |