Chromium Code Reviews| Index: Source/core/html/parser/XSSAuditor.h |
| diff --git a/Source/core/html/parser/XSSAuditor.h b/Source/core/html/parser/XSSAuditor.h |
| index cd43163245591099154d920eef65c4e9251f8d2e..a38403c4e4f9b1077c0b43cd7176e0d9f2e669c2 100644 |
| --- a/Source/core/html/parser/XSSAuditor.h |
| +++ b/Source/core/html/parser/XSSAuditor.h |
| @@ -82,6 +82,11 @@ private: |
| ScriptLikeAttributeTruncation |
| }; |
| + enum HrefRestriction { |
| + ProhibitSameOriginHref, |
| + AllowSameOriginHref |
| + }; |
| + |
| bool filterStartToken(const FilterTokenRequest&); |
| void filterEndToken(const FilterTokenRequest&); |
| bool filterCharacterToken(const FilterTokenRequest&); |
| @@ -96,9 +101,10 @@ private: |
| bool filterFormToken(const FilterTokenRequest&); |
| bool filterInputToken(const FilterTokenRequest&); |
| bool filterButtonToken(const FilterTokenRequest&); |
| + bool filterLinkToken(const FilterTokenRequest&); |
| bool eraseDangerousAttributesIfInjected(const FilterTokenRequest&); |
| - bool eraseAttributeIfInjected(const FilterTokenRequest&, const QualifiedName&, const String& replacementValue = String(), TruncationKind treatment = NormalAttributeTruncation); |
| + bool eraseAttributeIfInjected(const FilterTokenRequest&, const QualifiedName&, const String& replacementValue = String(), TruncationKind treatment = NormalAttributeTruncation, HrefRestriction = ProhibitSameOriginHref); |
|
Tom Sepez
2014/10/09 19:31:02
nit: the existing name "treatment" here adds no va
|
| String canonicalizedSnippetForTagName(const FilterTokenRequest&); |
| String canonicalizedSnippetForJavaScript(const FilterTokenRequest&); |