Index: content/public/browser/navigation_throttle.h |
diff --git a/content/public/browser/navigation_throttle.h b/content/public/browser/navigation_throttle.h |
index fff64b1f4fb8c61f425c27b140786fce5eaa617d..1654f1ac809f8ddf3db8dbe3b38a70d160d87b8e 100644 |
--- a/content/public/browser/navigation_throttle.h |
+++ b/content/public/browser/navigation_throttle.h |
@@ -32,6 +32,9 @@ class CONTENT_EXPORT NavigationThrottle { |
// Cancels the navigation and makes the requester of the navigation acts |
// like the request was never made. |
CANCEL_AND_IGNORE, |
+ |
+ // Block the navigation. |
+ BLOCK, |
}; |
NavigationThrottle(NavigationHandle* navigation_handle); |
@@ -55,6 +58,16 @@ class CONTENT_EXPORT NavigationThrottle { |
// CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. |
virtual ThrottleCheckResult WillRedirectRequest(); |
+ // Called when a network response is ready to commit for this navigation. |
+ // |
+ // The implementer is responsible for ensuring that the WebContents this |
+ // throttle is associated with remain alive during the duration of this |
+ // method. Failing to do so will result in use-after-free bugs. Should the |
+ // implementer need to destroy the WebContents, it should return CANCEL or |
+ // CANCEL_AND_IGNORE and perform the destruction asynchronously. This method |
+ // must not return DEFER, as it is the last step before committing. |
nasko
2016/01/20 23:15:07
Should we be adding BLOCK to the lists of possible
Mike West
2016/01/21 14:51:24
We should, and have. Thanks!
|
+ virtual ThrottleCheckResult WillProcessResponse(); |
+ |
// The NavigationHandle that is tracking the information related to this |
// navigation. |
NavigationHandle* navigation_handle() const { return navigation_handle_; } |