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

Delta Between Two Patch Sets: src/plugin/PluginFilter.h

Issue 11012013: Hanging resolved (critical sections unlocking) (Closed)
Left Patch Set: Using CriticalSection class instead Created June 17, 2013, 10:03 a.m.
Right Patch Set: Comments addressed Created June 25, 2013, 11:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/engine/Debug.cpp ('k') | src/plugin/PluginFilter.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
8 7
9 enum CFilterElementHideAttrPos 8 enum CFilterElementHideAttrPos
10 { 9 {
11 POS_NONE = 0, STARTING, ENDING, ANYWHERE, EXACT 10 POS_NONE = 0, STARTING, ENDING, ANYWHERE, EXACT
12 }; 11 };
13 12
14 enum CFilterElementHideAttrType 13 enum CFilterElementHideAttrType
15 { 14 {
16 TYPE_NONE = 0, STYLE, ID, CLASS 15 TYPE_NONE = 0, STYLE, ID, CLASS
17 }; 16 };
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // ============================================================================ 127 // ============================================================================
129 128
130 class CPluginFilter 129 class CPluginFilter
131 { 130 {
132 131
133 private: 132 private:
134 133
135 CString m_dataPath; 134 CString m_dataPath;
136 135
137 std::map<int, CString> m_contentMapText; 136 std::map<int, CString> m_contentMapText;
138
139 137
140 typedef std::map<DWORD, CFilter> TFilterMap; 138 typedef std::map<DWORD, CFilter> TFilterMap;
141 typedef std::vector<CFilter> TFilterMapDefault; 139 typedef std::vector<CFilter> TFilterMapDefault;
142 140
143 // (Tag,Name) -> Filter 141 // (Tag,Name) -> Filter
144 typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterE lementHideTagsNamed; 142 typedef std::multimap<std::pair<CString,CString>, CFilterElementHide> TFilterE lementHideTagsNamed;
145 143
146 // Tag -> Filter 144 // Tag -> Filter
147 typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags; 145 typedef std::multimap<CString, CFilterElementHide> TFilterElementHideTags;
148 146
(...skipping 22 matching lines...) Expand all
171 169
172 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom ain, const CString& indent) const; 170 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom ain, const CString& indent) const;
173 171
174 172
175 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add Debug=false) const; 173 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add Debug=false) const;
176 bool ShouldWhiteList(CString url) const; 174 bool ShouldWhiteList(CString url) const;
177 }; 175 };
178 176
179 177
180 #endif // _PLUGIN_FILTER_H_ 178 #endif // _PLUGIN_FILTER_H_
LEFTRIGHT

Powered by Google App Engine
This is Rietveld