Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginFilter.h

Issue 11012013: Hanging resolved (critical sections unlocking) (Closed)
Patch Set: Using CriticalSection class instead Created June 17, 2013, 10:03 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #ifndef _PLUGIN_FILTER_H_ 1 #ifndef _PLUGIN_FILTER_H_
2 #define _PLUGIN_FILTER_H_ 2 #define _PLUGIN_FILTER_H_
3 3
4 4
5 #include "PluginTypedef.h" 5 #include "PluginTypedef.h"
6 #include <memory> 6 #include <memory>
7 #include "..\shared\Utils.h"
Wladimir Palant 2013/06/17 12:57:24 This doesn't need to be included in the header, it
7 8
8 enum CFilterElementHideAttrPos 9 enum CFilterElementHideAttrPos
9 { 10 {
10 POS_NONE = 0, STARTING, ENDING, ANYWHERE, EXACT 11 POS_NONE = 0, STARTING, ENDING, ANYWHERE, EXACT
11 }; 12 };
12 13
13 enum CFilterElementHideAttrType 14 enum CFilterElementHideAttrType
14 { 15 {
15 TYPE_NONE = 0, STYLE, ID, CLASS 16 TYPE_NONE = 0, STYLE, ID, CLASS
16 }; 17 };
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 129
129 class CPluginFilter 130 class CPluginFilter
130 { 131 {
131 132
132 private: 133 private:
133 134
134 CString m_dataPath; 135 CString m_dataPath;
135 136
136 std::map<int, CString> m_contentMapText; 137 std::map<int, CString> m_contentMapText;
137 138
138 static CComAutoCriticalSection s_criticalSectionFilterMap; 139
139
140 typedef std::map<DWORD, CFilter> TFilterMap; 140 typedef std::map<DWORD, CFilter> TFilterMap;
141 typedef std::vector<CFilter> TFilterMapDefault; 141 typedef std::vector<CFilter> TFilterMapDefault;
142 142
143 // (Tag,Name) -> Filter 143 // (Tag,Name) -> Filter
144 typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterE lementHideTagsNamed; 144 typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterE lementHideTagsNamed;
145 145
146 // Tag -> Filter 146 // Tag -> Filter
147 typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags; 147 typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags;
148 148
149 149
(...skipping 21 matching lines...) Expand all
171 171
172 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom ain, const CString& indent) const; 172 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom ain, const CString& indent) const;
173 173
174 174
175 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add Debug=false) const; 175 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add Debug=false) const;
176 bool ShouldWhiteList(CString url) const; 176 bool ShouldWhiteList(CString url) const;
177 }; 177 };
178 178
179 179
180 #endif // _PLUGIN_FILTER_H_ 180 #endif // _PLUGIN_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld