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

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

Issue 2867833002: NavigationThrottle: allow customization of net::Error when blocking
Patch Set: Add unit tests. Created 3 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_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 #include <string> 9 #include <string>
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // yet. The connection info may change during the navigation (e.g. after 227 // yet. The connection info may change during the navigation (e.g. after
228 // encountering a server redirect). 228 // encountering a server redirect).
229 virtual net::HttpResponseInfo::ConnectionInfo GetConnectionInfo() = 0; 229 virtual net::HttpResponseInfo::ConnectionInfo GetConnectionInfo() = 0;
230 230
231 // Resumes a navigation that was previously deferred by a NavigationThrottle. 231 // Resumes a navigation that was previously deferred by a NavigationThrottle.
232 // Note: this may lead to the deletion of the NavigationHandle and its 232 // Note: this may lead to the deletion of the NavigationHandle and its
233 // associated NavigationThrottles. 233 // associated NavigationThrottles.
234 virtual void Resume() = 0; 234 virtual void Resume() = 0;
235 235
236 // Cancels a navigation that was previously deferred by a NavigationThrottle. 236 // Cancels a navigation that was previously deferred by a NavigationThrottle.
237 // |result| should be equal to NavigationThrottle::CANCEL or 237 // |result.action()| should be equal to NavigationThrottle::CANCEL or
238 // NavigationThrottle::CANCEL_AND_IGNORE. 238 // NavigationThrottle::CANCEL_AND_IGNORE.
239 // Note: this may lead to the deletion of the NavigationHandle and its 239 // Note: this may lead to the deletion of the NavigationHandle and its
240 // associated NavigationThrottles. 240 // associated NavigationThrottles.
241 virtual void CancelDeferredNavigation( 241 virtual void CancelDeferredNavigation(
242 NavigationThrottle::ThrottleCheckResult result) = 0; 242 NavigationThrottle::ThrottleCheckResult result) = 0;
243 243
244 // Returns the ID of the URLRequest associated with this navigation. Can only 244 // Returns the ID of the URLRequest associated with this navigation. Can only
245 // be called from NavigationThrottle::WillProcessResponse and 245 // be called from NavigationThrottle::WillProcessResponse and
246 // WebContentsObserver::ReadyToCommitNavigation. 246 // WebContentsObserver::ReadyToCommitNavigation.
247 // In the case of transfer navigations, this is the ID of the first request 247 // In the case of transfer navigations, this is the ID of the first request
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 // The NavigationData that the embedder returned from 297 // The NavigationData that the embedder returned from
298 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 298 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
299 // be a clone of the NavigationData. 299 // be a clone of the NavigationData.
300 virtual NavigationData* GetNavigationData() = 0; 300 virtual NavigationData* GetNavigationData() = 0;
301 }; 301 };
302 302
303 } // namespace content 303 } // namespace content
304 304
305 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 305 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698