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

Side by Side Diff: content/public/browser/navigation_throttle.h

Issue 1988933003: Revert "Introduce AncestorThrottle, which will process 'X-Frame-Options' headers." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 // If the NavigationHandle is destroyed while the navigation is deferred, 25 // If the NavigationHandle is destroyed while the navigation is deferred,
26 // the navigation will be canceled in the network stack. 26 // the navigation will be canceled in the network stack.
27 DEFER, 27 DEFER,
28 28
29 // Cancels the navigation. 29 // Cancels the navigation.
30 CANCEL, 30 CANCEL,
31 31
32 // Cancels the navigation and makes the requester of the navigation acts 32 // Cancels the navigation and makes the requester of the navigation acts
33 // like the request was never made. 33 // like the request was never made.
34 CANCEL_AND_IGNORE, 34 CANCEL_AND_IGNORE,
35
36 // Blocks a navigation due to rules asserted by a response (for instance,
37 // embedding restrictions like 'X-Frame-Options'). This result will only
38 // be returned from WillProcessResponse.
39 BLOCK_RESPONSE,
40 }; 35 };
41 36
42 NavigationThrottle(NavigationHandle* navigation_handle); 37 NavigationThrottle(NavigationHandle* navigation_handle);
43 virtual ~NavigationThrottle(); 38 virtual ~NavigationThrottle();
44 39
45 // Called when a network request is about to be made for this navigation. 40 // Called when a network request is about to be made for this navigation.
46 // 41 //
47 // The implementer is responsible for ensuring that the WebContents this 42 // The implementer is responsible for ensuring that the WebContents this
48 // throttle is associated with remain alive during the duration of this 43 // throttle is associated with remain alive during the duration of this
49 // method. Failing to do so will result in use-after-free bugs. Should the 44 // method. Failing to do so will result in use-after-free bugs. Should the
50 // implementer need to destroy the WebContents, it should return CANCEL, 45 // implementer need to destroy the WebContents, it should return CANCEL,
51 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. 46 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously.
52 virtual ThrottleCheckResult WillStartRequest(); 47 virtual ThrottleCheckResult WillStartRequest();
53 48
54 // Called when a server redirect is received by the navigation. 49 // Called when a server redirect is received by the navigation.
55 // 50 //
56 // The implementer is responsible for ensuring that the WebContents this 51 // The implementer is responsible for ensuring that the WebContents this
57 // throttle is associated with remain alive during the duration of this 52 // throttle is associated with remain alive during the duration of this
58 // 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
59 // implementer need to destroy the WebContents, it should return CANCEL, 54 // implementer need to destroy the WebContents, it should return CANCEL,
60 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. 55 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously.
61 virtual ThrottleCheckResult WillRedirectRequest(); 56 virtual ThrottleCheckResult WillRedirectRequest();
62 57
63 // Called when a response's headers and metadata are available. 58 // Called when a response's headers and metadata are available.
64 // 59 //
65 // The implementer is responsible for ensuring that the WebContents this 60 // The implementer is responsible for ensuring that the WebContents this
66 // throttle is associated with remain alive during the duration of this 61 // throttle is associated with remain alive during the duration of this
67 // method. Failing to do so will result in use-after-free bugs. Should the 62 // method. Failing to do so will result in use-after-free bugs. Should the
68 // implementer need to destroy the WebContents, it should return CANCEL, 63 // implementer need to destroy the WebContents, it should return CANCEL,
69 // CANCEL_AND_IGNORE, or BLOCK_RESPONSE and perform the destruction 64 // CANCEL_AND_IGNORE and perform the destruction asynchronously.
70 // asynchronously.
71 virtual ThrottleCheckResult WillProcessResponse(); 65 virtual ThrottleCheckResult WillProcessResponse();
72 66
73 // The NavigationHandle that is tracking the information related to this 67 // The NavigationHandle that is tracking the information related to this
74 // navigation. 68 // navigation.
75 NavigationHandle* navigation_handle() const { return navigation_handle_; } 69 NavigationHandle* navigation_handle() const { return navigation_handle_; }
76 70
77 private: 71 private:
78 NavigationHandle* navigation_handle_; 72 NavigationHandle* navigation_handle_;
79 }; 73 };
80 74
81 } // namespace content 75 } // namespace content
82 76
83 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ 77 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | third_party/WebKit/LayoutTests/http/tests/inspector/network/x-frame-options-deny.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698