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

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

Issue 304313003: Allow view-source of pages fully-blocked by Blink's XSS filter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for landing. Created 6 years, 5 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
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | content/browser/frame_host/navigation_entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_entry_impl.h
diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
index 613f45edb42b039a7f1d1a2a6830610a60c8e4f6..c162d220b63957bbe01c121c93cbfcfaa814f859 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -89,6 +89,7 @@ class CONTENT_EXPORT NavigationEntryImpl
virtual void SetRedirectChain(const std::vector<GURL>& redirects) OVERRIDE;
virtual const std::vector<GURL>& GetRedirectChain() const OVERRIDE;
virtual bool IsRestored() const OVERRIDE;
+ virtual bool GetXssDetected() const OVERRIDE;
// Once a navigation entry is committed, we should no longer track several
// pieces of non-persisted state, as documented on the members below.
@@ -218,6 +219,12 @@ class CONTENT_EXPORT NavigationEntryImpl
frame_tree_node_id_ = frame_tree_node_id;
}
+ // Called when an XSS detected by Blink's XSSAuditor caused the page to
+ // be blocked.
+ void set_xss_detected(bool xss_detected) {
+ xss_detected_ = xss_detected;
+ }
+
private:
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
// Session/Tab restore save portions of this class so that it can be recreated
@@ -322,6 +329,10 @@ class CONTENT_EXPORT NavigationEntryImpl
// value is not needed after the entry commits and is not persisted.
bool can_load_local_resources_;
+ // Set when this entry was blocked by Blink's XSSAuditor.
+ // TODO(tsepez): persist xss_detected_ (see WARNING section above).
+ bool xss_detected_;
+
// If not empty, the name of the frame to navigate. This field is not
// persisted, because it is currently only used in tests.
std::string frame_to_navigate_;
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | content/browser/frame_host/navigation_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698