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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 2552703003: Make reprioritization IPC batch rather than per-request.
Patch Set: Fix some typos. Created 4 years 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 // 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 10 matching lines...) Expand all
21 21
22 #include "base/callback_forward.h" 22 #include "base/callback_forward.h"
23 #include "base/gtest_prod_util.h" 23 #include "base/gtest_prod_util.h"
24 #include "base/macros.h" 24 #include "base/macros.h"
25 #include "base/memory/ref_counted.h" 25 #include "base/memory/ref_counted.h"
26 #include "base/observer_list.h" 26 #include "base/observer_list.h"
27 #include "base/time/time.h" 27 #include "base/time/time.h"
28 #include "content/browser/loader/global_routing_id.h" 28 #include "content/browser/loader/global_routing_id.h"
29 #include "content/browser/loader/resource_loader_delegate.h" 29 #include "content/browser/loader/resource_loader_delegate.h"
30 #include "content/common/content_export.h" 30 #include "content/common/content_export.h"
31 #include "content/common/resource_priority_change_info.h"
31 #include "content/common/url_loader.mojom.h" 32 #include "content/common/url_loader.mojom.h"
32 #include "content/public/browser/global_request_id.h" 33 #include "content/public/browser/global_request_id.h"
33 #include "content/public/browser/resource_dispatcher_host.h" 34 #include "content/public/browser/resource_dispatcher_host.h"
34 #include "content/public/browser/resource_request_info.h" 35 #include "content/public/browser/resource_request_info.h"
35 #include "content/public/common/request_context_type.h" 36 #include "content/public/common/request_context_type.h"
36 #include "content/public/common/resource_type.h" 37 #include "content/public/common/resource_type.h"
37 #include "ipc/ipc_message.h" 38 #include "ipc/ipc_message.h"
38 #include "net/base/load_states.h" 39 #include "net/base/load_states.h"
39 #include "net/base/request_priority.h" 40 #include "net/base/request_priority.h"
40 #include "url/gurl.h" 41 #include "url/gurl.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 ResourceContext* resource_context, 618 ResourceContext* resource_context,
618 RequestContextType fetch_request_context_type, 619 RequestContextType fetch_request_context_type,
619 AppCacheService* appcache_service, 620 AppCacheService* appcache_service,
620 int child_id, 621 int child_id,
621 int route_id, 622 int route_id,
622 std::unique_ptr<ResourceHandler> handler); 623 std::unique_ptr<ResourceHandler> handler);
623 624
624 void OnCancelRequest(ResourceRequesterInfo* requester_info, int request_id); 625 void OnCancelRequest(ResourceRequesterInfo* requester_info, int request_id);
625 void OnReleaseDownloadedFile(ResourceRequesterInfo* requester_info, 626 void OnReleaseDownloadedFile(ResourceRequesterInfo* requester_info,
626 int request_id); 627 int request_id);
627 void OnDidChangePriority(ResourceRequesterInfo* requester_info, 628 void OnDidChangePriority(
628 int request_id, 629 ResourceRequesterInfo* requester_info,
629 net::RequestPriority new_priority, 630 const std::vector<ResourcePriorityChangeInfo>& priority_changes);
630 int intra_priority_value);
631 631
632 // Creates ResourceRequestInfoImpl for a download or page save. 632 // Creates ResourceRequestInfoImpl for a download or page save.
633 // |download| should be true if the request is a file download. 633 // |download| should be true if the request is a file download.
634 ResourceRequestInfoImpl* CreateRequestInfo( 634 ResourceRequestInfoImpl* CreateRequestInfo(
635 int child_id, 635 int child_id,
636 int render_view_route_id, 636 int render_view_route_id,
637 int render_frame_route_id, 637 int render_frame_route_id,
638 bool download, 638 bool download,
639 ResourceContext* context); 639 ResourceContext* context);
640 640
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 780
781 // Points to the registered download handler intercept. 781 // Points to the registered download handler intercept.
782 CreateDownloadHandlerIntercept create_download_handler_intercept_; 782 CreateDownloadHandlerIntercept create_download_handler_intercept_;
783 783
784 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 784 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
785 }; 785 };
786 786
787 } // namespace content 787 } // namespace content
788 788
789 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 789 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698