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

Side by Side Diff: Source/core/html/parser/XSSAuditor.h

Issue 1322063002: Run HTMLSourceTracker hooks only when XSSAuditor is enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adam Barth. All Rights Reserved. 2 * Copyright (C) 2011 Adam Barth. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 XSSAuditor(); 61 XSSAuditor();
62 62
63 void init(Document*, XSSAuditorDelegate*); 63 void init(Document*, XSSAuditorDelegate*);
64 void initForFragment(); 64 void initForFragment();
65 65
66 PassOwnPtr<XSSInfo> filterToken(const FilterTokenRequest&); 66 PassOwnPtr<XSSInfo> filterToken(const FilterTokenRequest&);
67 bool isSafeToSendToAnotherThread() const; 67 bool isSafeToSendToAnotherThread() const;
68 68
69 void setEncoding(const WTF::TextEncoding&); 69 void setEncoding(const WTF::TextEncoding&);
70 70
71 bool isEnabled() const { return m_isEnabled; }
72
71 private: 73 private:
72 static const size_t kMaximumFragmentLengthTarget = 100; 74 static const size_t kMaximumFragmentLengthTarget = 100;
73 75
74 enum State { 76 enum State {
75 Uninitialized, 77 Uninitialized,
76 FilteringTokens, 78 FilteringTokens,
77 PermittingAdjacentCharacterTokens, 79 PermittingAdjacentCharacterTokens,
78 SuppressingAdjacentCharacterTokens 80 SuppressingAdjacentCharacterTokens
79 }; 81 };
80 82
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 134
133 State m_state; 135 State m_state;
134 bool m_scriptTagFoundInRequest; 136 bool m_scriptTagFoundInRequest;
135 unsigned m_scriptTagNestingLevel; 137 unsigned m_scriptTagNestingLevel;
136 WTF::TextEncoding m_encoding; 138 WTF::TextEncoding m_encoding;
137 }; 139 };
138 140
139 } 141 }
140 142
141 #endif 143 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698