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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 1542743002: [RDHI] Refactored blocked_loaders_map_ to key by render frame route id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_dispatcher_host_impl.h
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index 1c745bd13091ce73f90d60c269588b81656995a1..b07d54ad4f8ced291a7dedb309923cf32030564c 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -38,6 +38,7 @@
#include "content/public/browser/download_url_parameters.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/common/resource_type.h"
#include "ipc/ipc_message.h"
@@ -63,6 +64,7 @@ class ShareableFileReference;
namespace content {
class AppCacheService;
class AsyncRevalidationManager;
+class FrameTree;
class NavigationURLLoaderImplCore;
class ResourceContext;
class ResourceDispatcherHostDelegate;
@@ -105,8 +107,6 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
uint32_t download_id,
const DownloadStartedCallback& started_callback) override;
void ClearLoginDelegateForRequest(net::URLRequest* request) override;
- void BlockRequestsForRoute(int child_id, int route_id) override;
- void ResumeBlockedRequestsForRoute(int child_id, int route_id) override;
// Puts the resource dispatcher host in an inactive state (unable to begin
// new requests). Cancels all pending requests.
@@ -176,6 +176,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
return save_file_manager_.get();
}
+ void OnRenderFrameHostDeleted(const GlobalFrameRoutingId& routing_id);
+
// Called when a RenderViewHost is created.
void OnRenderViewHostCreated(int child_id,
int route_id,
@@ -211,8 +213,16 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
void RemovePendingRequest(int child_id, int request_id);
+ // Causes all new requests for the route identified by |child_id| and
Charlie Harrison 2016/01/04 22:07:43 Will fix this comment in next patch.
Charlie Harrison 2016/01/07 22:47:05 Done.
+ // |route_id| to be blocked (not being started) until
+ // ResumeBlockedRequestsForRoute is called.
+ void BlockRequestsForFrame(const GlobalFrameRoutingId& routing_id);
+
+ // Resumes any blocked request for the specified route id.
+ void ResumeBlockedRequestsForFrame(const GlobalFrameRoutingId& routing_id);
+
// Cancels any blocked request for the specified route id.
- void CancelBlockedRequestsForRoute(int child_id, int route_id);
+ void CancelBlockedRequestsForFrame(const GlobalFrameRoutingId& routing_id);
// Maintains a collection of temp files created in support of
// the download_to_file capability. Used to grant access to the
@@ -379,7 +389,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// Force cancels any pending requests for the given route id. This method
// acts like CancelRequestsForProcess when route_id is -1.
Charlie Harrison 2016/01/04 22:07:43 Will fix this comment in the next patch.
Charlie Harrison 2016/01/07 22:47:05 Done.
- void CancelRequestsForRoute(int child_id, int route_id);
+ void CancelRequestsForFrame(const GlobalFrameRoutingId& routing_id);
// The list of all requests that we have pending. This list is not really
// optimized, and assumes that we have relatively few requests pending at once
@@ -424,8 +434,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
void UpdateLoadInfo();
// Resumes or cancels (if |cancel_requests| is true) any blocked requests.
- void ProcessBlockedRequestsForRoute(int child_id,
- int route_id,
+ void ProcessBlockedRequestsForFrame(const GlobalFrameRoutingId& routing_id,
bool cancel_requests);
void OnRequestResource(int routing_id,
@@ -551,7 +560,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
bool is_shutdown_;
typedef std::vector<linked_ptr<ResourceLoader> > BlockedLoadersList;
- typedef std::map<GlobalRoutingID, BlockedLoadersList*> BlockedLoadersMap;
+ typedef std::map<GlobalFrameRoutingId, BlockedLoadersList*> BlockedLoadersMap;
BlockedLoadersMap blocked_loaders_map_;
// Maps the child_ids to the approximate number of bytes

Powered by Google App Engine
This is Rietveld 408576698