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

Unified Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: Fix Android PDF tests where PDFs should be downloaded Created 3 years, 8 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/browser/frame_host/navigation_handle_impl.h
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index c3c3fa73f859706e237d986e0e520be77c31fb6b..ed0973912465a49bba5749c91f7605274ab4a8ef 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -177,6 +177,11 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
// enabled. Make it work in both modes.
bool is_form_submission() const { return is_form_submission_; }
+ // 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.
+ bool is_download() const { return is_download_; }
+
// The NavigatorDelegate to notify/query for various navigation events.
// Normally this is the WebContents, except if this NavigationHandle was
// created during a navigation to an interstitial page. In this case it will
« no previous file with comments | « content/browser/frame_host/data_url_navigation_throttle.cc ('k') | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698