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: Call parameters in JS wrappers generated statically Created Jan. 28, 2016, 9:26 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 "Filter.h"
5 #include "api.h"
6 #include "StringMap.h"
7
8 class ActiveFilter : public Filter
9 {
10 private:
11 bool mIgnoreTrailingDot;
12 typedef StringMap<bool> DomainMap;
13 typedef StringSet SitekeySet;
14 protected:
15 std::unique_ptr<DomainMap> mDomains;
16 std::unique_ptr<SitekeySet> mSitekeys;
17 void ParseDomains(const String& str, char16_t separator);
18 void AddSitekey(const String& sitekey);
19 public:
20 explicit ActiveFilter(const String& text,
21 bool ignoreTrailingDot);
22 FILTER_PROPERTY(bool, mDisabled, GetDisabled, SetDisabled);
23 FILTER_PROPERTY(unsigned int, mHitCount, GetHitCount, SetHitCount);
24 FILTER_PROPERTY(unsigned int, mLastHit, GetLastHit, SetLastHit);
25 bool IsActiveOnDomain(String& docDomain,
26 const String& sitekey) const;
27 bool IsActiveOnlyOnDomain(String& docDomain) const;
28 bool IsGeneric() const;
29 String Serialize() const;
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