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

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

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incorporated feedback Created 8 years, 7 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/renderer_host/resource_dispatcher_host_impl.h
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.h b/content/browser/renderer_host/resource_dispatcher_host_impl.h
index 22276e6ed331cb079e1f5b922271196b4dcff9f4..e556485ab3f39c62954d16e72d05963a9138c261 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_impl.h
+++ b/content/browser/renderer_host/resource_dispatcher_host_impl.h
@@ -120,6 +120,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
int request_id,
bool from_renderer);
+ // If the request still exists it is marked as canceled with a
+ // HANDLED_EXTERNALLY status.
+ void CancelRequestWithHandledExternallyStatus(int child_id, int request_id);
+
// Follows a deferred redirect for the given request.
// new_first_party_for_cookies, if non-empty, is the new cookie policy URL
// for the redirected URL. If the cookie policy URL needs changing, pass
@@ -324,10 +328,20 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// Helper function for regular and download requests.
void BeginRequestInternal(net::URLRequest* request);
+ // Helper function that resolves the request for the given (child_id,
+ // request_id) pair, cancels that request and posts a completion notification
+ // for the request if needed.
+ void CancelRequestWorker(int child_id,
+ int request_id,
+ bool from_renderer,
+ bool handled_externally);
+
// Helper function that cancels |request|. Returns whether the
// request was actually cancelled. If a renderer cancels a request
// for a download, we ignore the cancellation.
- bool CancelRequestInternal(net::URLRequest* request, bool from_renderer);
+ bool CancelRequestInternal(net::URLRequest* request,
+ bool from_renderer,
+ bool handled_externally);
// Updates the "cost" of outstanding requests for |child_id|.
// The "cost" approximates how many bytes are consumed by all the in-memory

Powered by Google App Engine
This is Rietveld 408576698