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

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: Add xss_detected_ bool and use it. Created 6 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 side-by-side diff with in-line comments
Download patch
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..cfd2886c4cb2a05c7422f34c7df548f56a14a222 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,9 @@ 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.
+ bool xss_detected_;
nasko 2014/06/18 21:54:48 Is this supposed to be serialized for session rest
Tom Sepez 2014/06/18 22:13:22 Probably. Got a pointer to what should be done?
nasko 2014/06/18 22:17:24 Look up in this file for a line with lots of WARNI
+
// 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_;

Powered by Google App Engine
This is Rietveld 408576698