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

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

Issue 2060313002: Navigation throttle for the Safe Browsing Subresource Filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pre-tab-activation
Patch Set: Comment to SubresourceFilterNavigationThrotle explaining its purpose. Created 4 years, 6 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_HANDLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // handlers. 118 // handlers.
119 virtual bool IsExternalProtocol() = 0; 119 virtual bool IsExternalProtocol() = 0;
120 120
121 // Navigation control flow -------------------------------------------------- 121 // Navigation control flow --------------------------------------------------
122 122
123 // The net error code if an error happened prior to commit. Otherwise it will 123 // The net error code if an error happened prior to commit. Otherwise it will
124 // be net::OK. 124 // be net::OK.
125 virtual net::Error GetNetErrorCode() = 0; 125 virtual net::Error GetNetErrorCode() = 0;
126 126
127 // Returns the RenderFrameHost this navigation is taking place in. This can 127 // Returns the RenderFrameHost this navigation is taking place in. This can
128 // only be accessed after the navigation is ready to commit. 128 // only be accessed after the navigation starts processing the response.
129 // The RenderFrameHost returned back might not be the final one, if method is
clamy 2016/06/24 12:13:38 So 2 things here: With PlzNavigate this is the fin
melandory 2016/06/25 01:46:10 Done.
130 // called before ReadyToCommitNavigation is dispatched.
129 virtual RenderFrameHost* GetRenderFrameHost() = 0; 131 virtual RenderFrameHost* GetRenderFrameHost() = 0;
130 132
131 // Whether the navigation happened in the same page. This is only known 133 // Whether the navigation happened in the same page. This is only known
132 // after the navigation has committed. It is an error to call this method 134 // after the navigation has committed. It is an error to call this method
133 // before the navigation has committed. 135 // before the navigation has committed.
134 virtual bool IsSamePage() = 0; 136 virtual bool IsSamePage() = 0;
135 137
136 // Whether the navigation has encountered a server redirect or not. 138 // Whether the navigation has encountered a server redirect or not.
137 virtual bool WasServerRedirect() = 0; 139 virtual bool WasServerRedirect() = 0;
138 140
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 ui::PageTransition transition, 182 ui::PageTransition transition,
181 bool is_external_protocol) = 0; 183 bool is_external_protocol) = 0;
182 184
183 // Simulates the network request being redirected. 185 // Simulates the network request being redirected.
184 virtual NavigationThrottle::ThrottleCheckResult 186 virtual NavigationThrottle::ThrottleCheckResult
185 CallWillRedirectRequestForTesting(const GURL& new_url, 187 CallWillRedirectRequestForTesting(const GURL& new_url,
186 bool new_method_is_post, 188 bool new_method_is_post,
187 const GURL& new_referrer_url, 189 const GURL& new_referrer_url,
188 bool new_is_external_protocol) = 0; 190 bool new_is_external_protocol) = 0;
189 191
192 // Simulates that throttle is about to process the response.
193 virtual NavigationThrottle::ThrottleCheckResult
194 CallWillProcessResponseForTesting(RenderFrameHost* render_frame_host) = 0;
195
190 // The NavigationData that the embedder returned from 196 // The NavigationData that the embedder returned from
191 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 197 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
192 // be a clone of the NavigationData. 198 // be a clone of the NavigationData.
193 virtual NavigationData* GetNavigationData() = 0; 199 virtual NavigationData* GetNavigationData() = 0;
194 }; 200 };
195 201
196 } // namespace content 202 } // namespace content
197 203
198 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 204 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698