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..44c348f32ce2af762a5a31a12bb0218d9e967850 100644 |
--- a/content/public/browser/navigation_throttle.h |
+++ b/content/public/browser/navigation_throttle.h |
@@ -55,6 +55,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. |
+ virtual ThrottleCheckResult WillProcessResponse(); |
+ |
// The NavigationHandle that is tracking the information related to this |
// navigation. |
NavigationHandle* navigation_handle() const { return navigation_handle_; } |