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

Unified Diff: src/plugin/PluginFilter.h

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Patch Set: remove debugging code Created Nov. 24, 2014, 11:09 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/PluginFilter.h
===================================================================
--- a/src/plugin/PluginFilter.h
+++ b/src/plugin/PluginFilter.h
@@ -4,6 +4,7 @@
#include "PluginTypedef.h"
#include <memory>
+#include <AdblockPlus/FilterEngine.h>
enum CFilterElementHideAttrPos
{
@@ -80,24 +81,6 @@
public:
- enum EContentType
- {
- contentTypeUnknown = 0,
- contentTypeOther = 1,
- contentTypeScript = 2,
- contentTypeImage = 4,
- contentTypeStyleSheet = 8,
- contentTypeObject = 16,
- contentTypeSubdocument = 32,
- contentTypeDocument = 64,
- contentTypeBackground = 256,
- contentTypeXbl = 512,
- contentTypePing = 1024,
- contentTypeXmlHttpRequest = 2048,
- contentTypeObjectSubrequest = 4096,
- contentTypeDtd = 8192,
- contentTypeAny = 65535
- } contentType;
enum EFilterType
{
@@ -107,7 +90,7 @@
filterTypeUnknown = 3
} filterType;
- int m_contentType;
+ AdblockPlus::FilterEngine::ContentType m_contentType;
enum EFilterType m_filterType;
bool m_isMatchCase;
bool m_isFirstParty;
@@ -132,8 +115,6 @@
CString m_dataPath;
- std::map<int, CString> m_contentMapText;
-
typedef std::map<DWORD, CFilter> TFilterMap;
typedef std::vector<CFilter> TFilterMapDefault;
@@ -165,7 +146,7 @@
bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::wstring& domain, const std::wstring& indent) const;
- bool ShouldBlock(const std::wstring& src, int contentType, const std::wstring& domain, bool addDebug=false) const;
+ bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentType contentType, const std::wstring& domain, bool addDebug=false) const;
HANDLE hideFiltersLoadedEvent;
};

Powered by Google App Engine
This is Rietveld