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

Side by Side Diff: compiled/ActiveFilter.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Almost complete implementation, missing CSS property filters Created Jan. 20, 2016, 12:04 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compile ('k') | compiled/ActiveFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef ADBLOCK_PLUS_ACTIVE_FILTER_H
2 #define ADBLOCK_PLUS_ACTIVE_FILTER_H
3
4 #include <string>
5 #include <unordered_map>
6 #include <unordered_set>
7
8 #include "Filter.h"
9 #include "api.h"
10
11 class ActiveFilter : public Filter
12 {
13 private:
14 bool ignoreTrailingDot;
15 protected:
16 std::unordered_map<std::u16string,bool> domains;
17 std::unordered_set<std::u16string> sitekeys;
18 void ParseDomains(const std::u16string& str, char16_t separator);
19 public:
20 explicit ActiveFilter(const std::u16string& text,
21 bool ignoreTrailingDot);
22 FILTER_PROPERTY(bool, disabled, GetDisabled, SetDisabled);
23 FILTER_PROPERTY(unsigned int, hitCount, GetHitCount, SetHitCount);
24 FILTER_PROPERTY(unsigned int, lastHit, GetLastHit, SetLastHit);
25 bool IsActiveOnDomain(const std::u16string& docDomain,
26 const std::u16string& sitekey);
27 bool IsActiveOnlyOnDomain(const std::u16string& docDomain);
28 bool IsGeneric();
29 const std::u16string Serialize();
30 };
31
32 #endif
OLDNEW
« no previous file with comments | « compile ('k') | compiled/ActiveFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld