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

Unified Diff: content/public/browser/resource_throttle.h

Issue 893843003: Add RedirectInfo as a redirect parameter to ResourceThrottles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document ResourceThrottle Created 5 years, 10 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
« no previous file with comments | « content/browser/loader/throttling_resource_handler.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/resource_throttle.h
diff --git a/content/public/browser/resource_throttle.h b/content/public/browser/resource_throttle.h
index 574025d8275b4c239f21cf74314fae4406ddb952..240d95e1967b0a01d028d8c4be9e8a961bcde7be 100644
--- a/content/public/browser/resource_throttle.h
+++ b/content/public/browser/resource_throttle.h
@@ -9,6 +9,10 @@
class GURL;
+namespace net {
+struct RedirectInfo;
+}
+
namespace content {
class ResourceController;
@@ -22,9 +26,20 @@ class ResourceThrottle {
public:
virtual ~ResourceThrottle() {}
+ // Called before the resource request is started.
virtual void WillStartRequest(bool* defer) {}
+
+ // Called before the resource request uses the network for the first time.
virtual void WillStartUsingNetwork(bool* defer) {}
- virtual void WillRedirectRequest(const GURL& new_url, bool* defer) {}
+
+ // Called when the request was redirected. |redirect_info| contains the
+ // redirect responses's HTTP status code and some information about the new
+ // request that will be sent if the redirect is followed, including the new
+ // URL and new method.
+ virtual void WillRedirectRequest(const net::RedirectInfo& redirect_info,
+ bool* defer) {}
+
+ // Called when the response headers and meta data are available.
virtual void WillProcessResponse(bool* defer) {}
// Returns the name of the throttle, as a UTF-8 C-string, for logging
« no previous file with comments | « content/browser/loader/throttling_resource_handler.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698