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

Side by Side Diff: compiled/filter/ActiveFilter.h

Issue 29595633: Issue 5870 - Implement the new ElemHideEmulation filter type (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Review comments Created Jan. 30, 2018, 10:52 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 | « no previous file | compiled/filter/ActiveFilter.cpp » ('j') | test/compiled/Filter.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void ParseDomains(const String& domains, String::value_type separator) const; 53 void ParseDomains(const String& domains, String::value_type separator) const;
54 void AddSitekey(const String& sitekey) const; 54 void AddSitekey(const String& sitekey) const;
55 virtual SitekeySet* GetSitekeys() const; 55 virtual SitekeySet* GetSitekeys() const;
56 mutable std::unique_ptr<DomainMap> mDomains; 56 mutable std::unique_ptr<DomainMap> mDomains;
57 mutable std::unique_ptr<SitekeySet> mSitekeys; 57 mutable std::unique_ptr<SitekeySet> mSitekeys;
58 private: 58 private:
59 bool mIgnoreTrailingDot; 59 bool mIgnoreTrailingDot;
60 public: 60 public:
61 static constexpr Type classType = Type::ACTIVE; 61 static constexpr Type classType = Type::ACTIVE;
62 explicit ActiveFilter(Type type, const String& text, bool ignoreTrailingDot); 62 explicit ActiveFilter(Type type, const String& text, bool ignoreTrailingDot);
63 explicit ActiveFilter(Type type, String&& text, bool ignoreTrailingDot);
63 FILTER_PROPERTY(bool, mDisabled, FILTER_DISABLED, GetDisabled, SetDisabled); 64 FILTER_PROPERTY(bool, mDisabled, FILTER_DISABLED, GetDisabled, SetDisabled);
64 FILTER_PROPERTY(unsigned int, mHitCount, FILTER_HITCOUNT, 65 FILTER_PROPERTY(unsigned int, mHitCount, FILTER_HITCOUNT,
65 GetHitCount, SetHitCount); 66 GetHitCount, SetHitCount);
66 FILTER_PROPERTY(unsigned int, mLastHit, FILTER_LASTHIT, 67 FILTER_PROPERTY(unsigned int, mLastHit, FILTER_LASTHIT,
67 GetLastHit, SetLastHit); 68 GetLastHit, SetLastHit);
68 bool BINDINGS_EXPORTED IsActiveOnDomain(DependentString& docDomain, 69 bool BINDINGS_EXPORTED IsActiveOnDomain(DependentString& docDomain,
69 const String& sitekey = DependentString()) const; 70 const String& sitekey = DependentString()) const;
70 bool BINDINGS_EXPORTED IsActiveOnlyOnDomain(DependentString& docDomain) const; 71 bool BINDINGS_EXPORTED IsActiveOnlyOnDomain(DependentString& docDomain) const;
71 bool BINDINGS_EXPORTED IsGeneric() const; 72 bool BINDINGS_EXPORTED IsGeneric() const;
72 OwnedString BINDINGS_EXPORTED Serialize() const; 73 OwnedString BINDINGS_EXPORTED Serialize() const;
73 }; 74 };
74 75
75 typedef intrusive_ptr<ActiveFilter> ActiveFilterPtr; 76 typedef intrusive_ptr<ActiveFilter> ActiveFilterPtr;
OLDNEW
« no previous file with comments | « no previous file | compiled/filter/ActiveFilter.cpp » ('j') | test/compiled/Filter.cpp » ('J')

Powered by Google App Engine
This is Rietveld