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

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

Issue 1645363002: Revert of Teach navigation throttles how to cancel requests in WillProcessResponse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
65 virtual ThrottleCheckResult WillProcessResponse();
66
67 // The NavigationHandle that is tracking the information related to this 58 // The NavigationHandle that is tracking the information related to this
68 // navigation. 59 // navigation.
69 NavigationHandle* navigation_handle() const { return navigation_handle_; } 60 NavigationHandle* navigation_handle() const { return navigation_handle_; }
70 61
71 private: 62 private:
72 NavigationHandle* navigation_handle_; 63 NavigationHandle* navigation_handle_;
73 }; 64 };
74 65
75 } // namespace content 66 } // namespace content
76 67
77 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ 68 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_resource_throttle.cc ('k') | content/public/browser/navigation_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698