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

Unified Diff: content/public/browser/navigation_handle.h

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: nasko comments, fix most tests Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/navigation_handle.h
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index 684fd26aa145b62a67505afb0e6db0e3a5ab4456..6ead5afab55cf4df669e394b867488bcd944fc1b 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -183,6 +183,11 @@ class CONTENT_EXPORT NavigationHandle {
// errors that leave the user on the previous page.
virtual bool HasCommitted() = 0;
+ // Whether the navigation request is a download. This is useful when the
+ // navigation hasn't committed yet, in which case HasCommitted() will return
+ // false even if the navigation request is not a download.
+ virtual bool IsDownload() = 0;
nasko 2017/03/30 23:15:45 We don't need to expose this method at this time,
meacer 2017/04/05 22:33:28 Done.
+
// Whether the navigation resulted in an error page.
// Note that if an error page reloads, this will return true even though
// GetNetErrorCode will be net::OK.

Powered by Google App Engine
This is Rietveld 408576698