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

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

Issue 14327009: XSSAuditor performance regression in M26 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698