| Index: Shared/PluginFilter.h |
| =================================================================== |
| --- a/Shared/PluginFilter.h |
| +++ b/Shared/PluginFilter.h |
| @@ -41,7 +41,6 @@ |
| public: |
| CString m_filterText; |
| - CString m_filterFile; |
| // For domain specific filters only |
| CString m_tagId; |
| @@ -51,7 +50,7 @@ |
| std::vector<CFilterElementHideAttrSelector> m_attributeSelectors; |
| - CFilterElementHide(const CString& filterText="", const CString& filterFile=""); |
| + CFilterElementHide(const CString& filterText=""); |
| CFilterElementHide(const CFilterElementHide& filter); |
| }; |
| @@ -102,7 +101,6 @@ |
| bool m_isFromEnd; |
| int m_hitCount; |
| CString m_filterText; |
| - CString m_filterFile; |
| std::set<CString> m_domains; |
| std::set<CString> m_domainsNot; |
| @@ -150,7 +148,7 @@ |
| TFilterMap m_filterMap[2][2]; |
| TFilterMapDefault m_filterMapDefault[2]; |
| - void ParseFilters(const TFilterFileList& urlList); |
| + void ClearFilters(); |
| int FindMatch(const CString& src, CString filterPart, int startPos=0) const; |
| bool IsSpecialChar(TCHAR testChar) const; |
| @@ -158,13 +156,12 @@ |
| public: |
| - CPluginFilter(const TFilterFileList& urlList, const CString& dataPath); |
| CPluginFilter(const CString& dataPath = ""); |
| - bool ReadFilter(const CString& filename, const CString& downloadPath=""); |
| + bool LoadHideFilters(std::vector<std::string> filters); |
| - void AddFilter(CString filter, CString filterFile, int filterType); |
| - bool AddFilterElementHide(CString filter, CString filterFile); |
| + bool AddFilterElementHide(CString filter); |
| + |
| bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& domain, const CString& indent) const; |
| @@ -173,12 +170,6 @@ |
| bool IsMatchFilterElementHide(const CFilterElementHide& filter, IHTMLElement* pEl, const CString& domain) const; |
| -#if (defined PRODUCT_ADBLOCKPLUS) |
| - bool static DownloadFilterFile(const CString& url, const CString& filename); |
| - void static CreateFilters(); |
| - bool IsAlive() const; |
| -#endif |
| - |
| bool ShouldBlock(CString src, int contentType, const CString& domain, bool addDebug=false) const; |
| bool ShouldWhiteList(CString url) const; |
| }; |