OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 | 48 |
49 // Called when a server redirect is received by the navigation. | 49 // Called when a server redirect is received by the navigation. |
50 // | 50 // |
51 // The implementer is responsible for ensuring that the WebContents this | 51 // The implementer is responsible for ensuring that the WebContents this |
52 // throttle is associated with remain alive during the duration of this | 52 // throttle is associated with remain alive during the duration of this |
53 // method. Failing to do so will result in use-after-free bugs. Should the | 53 // method. Failing to do so will result in use-after-free bugs. Should the |
54 // implementer need to destroy the WebContents, it should return CANCEL, | 54 // implementer need to destroy the WebContents, it should return CANCEL, |
55 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. | 55 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. |
56 virtual ThrottleCheckResult WillRedirectRequest(); | 56 virtual ThrottleCheckResult WillRedirectRequest(); |
57 | 57 |
58 // Called when a response's headers and metadata are available. | |
59 // | |
60 // The implementer is responsible for ensuring that the WebContents this | |
61 // throttle is associated with remain alive during the duration of this | |
62 // method. Failing to do so will result in use-after-free bugs. Should the | |
63 // implementer need to destroy the WebContents, it should return CANCEL, | |
64 // CANCEL_AND_IGNORE and perform the destruction asynchronously. The | |
clamy
2016/01/25 16:36:21
Let's remove last condition. There is one known ca
Mike West
2016/01/26 09:41:42
Done.
| |
65 // implementer MUST NOT return DEFER. | |
66 virtual ThrottleCheckResult WillProcessResponse(); | |
67 | |
58 // The NavigationHandle that is tracking the information related to this | 68 // The NavigationHandle that is tracking the information related to this |
59 // navigation. | 69 // navigation. |
60 NavigationHandle* navigation_handle() const { return navigation_handle_; } | 70 NavigationHandle* navigation_handle() const { return navigation_handle_; } |
61 | 71 |
62 private: | 72 private: |
63 NavigationHandle* navigation_handle_; | 73 NavigationHandle* navigation_handle_; |
64 }; | 74 }; |
65 | 75 |
66 } // namespace content | 76 } // namespace content |
67 | 77 |
68 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ | 78 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
OLD | NEW |