| OLD | NEW |
| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 HTMLSourceTracker& sourceTracker; | 52 HTMLSourceTracker& sourceTracker; |
| 53 bool shouldAllowCDATA; | 53 bool shouldAllowCDATA; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 class XSSAuditor { | 56 class XSSAuditor { |
| 57 WTF_MAKE_NONCOPYABLE(XSSAuditor); | 57 WTF_MAKE_NONCOPYABLE(XSSAuditor); |
| 58 public: | 58 public: |
| 59 XSSAuditor(); | 59 XSSAuditor(); |
| 60 | 60 |
| 61 void init(Document*, XSSAuditorDelegate*); | 61 void init(Document*, XSSAuditorDelegate*); |
| 62 void initForFragment(); |
| 63 |
| 62 PassOwnPtr<XSSInfo> filterToken(const FilterTokenRequest&); | 64 PassOwnPtr<XSSInfo> filterToken(const FilterTokenRequest&); |
| 63 bool isSafeToSendToAnotherThread() const; | 65 bool isSafeToSendToAnotherThread() const; |
| 64 | 66 |
| 65 private: | 67 private: |
| 66 static const size_t kMaximumFragmentLengthTarget = 100; | 68 static const size_t kMaximumFragmentLengthTarget = 100; |
| 67 | 69 |
| 68 enum State { | 70 enum State { |
| 69 Uninitialized, | 71 Uninitialized, |
| 70 Initialized | 72 Initialized |
| 71 }; | 73 }; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 117 |
| 116 State m_state; | 118 State m_state; |
| 117 String m_cachedDecodedSnippet; | 119 String m_cachedDecodedSnippet; |
| 118 unsigned m_scriptTagNestingLevel; | 120 unsigned m_scriptTagNestingLevel; |
| 119 TextEncoding m_encoding; | 121 TextEncoding m_encoding; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } | 124 } |
| 123 | 125 |
| 124 #endif | 126 #endif |
| OLD | NEW |