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

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

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
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 10 matching lines...) Expand all
21 #include "../StringScanner.h" 21 #include "../StringScanner.h"
22 22
23 const DependentString ActiveFilter::DEFAULT_DOMAIN(u""_str); 23 const DependentString ActiveFilter::DEFAULT_DOMAIN(u""_str);
24 24
25 ActiveFilter::ActiveFilter(Type type, const String& text, bool ignoreTrailingDot ) 25 ActiveFilter::ActiveFilter(Type type, const String& text, bool ignoreTrailingDot )
26 : Filter(type, text), mIgnoreTrailingDot(ignoreTrailingDot), 26 : Filter(type, text), mIgnoreTrailingDot(ignoreTrailingDot),
27 mDisabled(false), mHitCount(0), mLastHit(0) 27 mDisabled(false), mHitCount(0), mLastHit(0)
28 { 28 {
29 } 29 }
30 30
31 ActiveFilter::ActiveFilter(Type type, String&& text, bool ignoreTrailingDot)
32 : Filter(type, std::move(text)), mIgnoreTrailingDot(ignoreTrailingDot),
33 mDisabled(false), mHitCount(0), mLastHit(0)
34 {
35 }
36
31 ActiveFilter::DomainMap* ActiveFilter::GetDomains() const 37 ActiveFilter::DomainMap* ActiveFilter::GetDomains() const
32 { 38 {
33 return mDomains.get(); 39 return mDomains.get();
34 } 40 }
35 41
36 ActiveFilter::SitekeySet* ActiveFilter::GetSitekeys() const 42 ActiveFilter::SitekeySet* ActiveFilter::GetSitekeys() const
37 { 43 {
38 return mSitekeys.get(); 44 return mSitekeys.get();
39 } 45 }
40 46
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 result.append(u'\n'); 190 result.append(u'\n');
185 } 191 }
186 if (mLastHit) 192 if (mLastHit)
187 { 193 {
188 result.append(u"lastHit="_str); 194 result.append(u"lastHit="_str);
189 result.append(mLastHit); 195 result.append(mLastHit);
190 result.append(u'\n'); 196 result.append(u'\n');
191 } 197 }
192 return result; 198 return result;
193 } 199 }
OLDNEW

Powered by Google App Engine
This is Rietveld