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

Delta Between Two Patch Sets: compiled/filter/ActiveFilter.h

Issue 29398669: Issue 5063 - [emscripten] Make FilterNotifier calls more efficient (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Left Patch Set: Rebased Created April 13, 2017, 1:07 p.m.
Right Patch Set: Addressed comments Created April 20, 2017, 8 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « compiled/bindings.ipp ('k') | compiled/shell.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 17 matching lines...) Expand all
28 type name;\ 28 type name;\
29 public:\ 29 public:\
30 type EMSCRIPTEN_KEEPALIVE getter() const\ 30 type EMSCRIPTEN_KEEPALIVE getter() const\
31 {\ 31 {\
32 return name;\ 32 return name;\
33 }\ 33 }\
34 void EMSCRIPTEN_KEEPALIVE setter(type value)\ 34 void EMSCRIPTEN_KEEPALIVE setter(type value)\
35 {\ 35 {\
36 if (name != value)\ 36 if (name != value)\
37 {\ 37 {\
38 type oldvalue = name;\
39 name = value;\ 38 name = value;\
40 if (FilterNotifier::Topic::topic != FilterNotifier::Topic::NONE)\ 39 if (FilterNotifier::Topic::topic != FilterNotifier::Topic::NONE)\
41 {\ 40 {\
42 FilterNotifier::PropertyChange(FilterNotifier::Topic::topic,\ 41 FilterNotifier::FilterChange(FilterNotifier::Topic::topic, this);\
43 this, value, oldvalue);\
44 }\ 42 }\
45 }\ 43 }\
46 } 44 }
47 45
48 class ActiveFilter : public Filter 46 class ActiveFilter : public Filter
49 { 47 {
50 protected: 48 protected:
51 typedef StringMap<bool> DomainMap; 49 typedef StringMap<bool> DomainMap;
52 typedef StringSet SitekeySet; 50 typedef StringSet SitekeySet;
53 void ParseDomains(const String& domains, String::value_type separator) const; 51 void ParseDomains(const String& domains, String::value_type separator) const;
(...skipping 10 matching lines...) Expand all
64 FILTER_PROPERTY(unsigned int, mHitCount, FILTER_HITCOUNT, 62 FILTER_PROPERTY(unsigned int, mHitCount, FILTER_HITCOUNT,
65 GetHitCount, SetHitCount); 63 GetHitCount, SetHitCount);
66 FILTER_PROPERTY(unsigned int, mLastHit, FILTER_LASTHIT, 64 FILTER_PROPERTY(unsigned int, mLastHit, FILTER_LASTHIT,
67 GetLastHit, SetLastHit); 65 GetLastHit, SetLastHit);
68 bool EMSCRIPTEN_KEEPALIVE IsActiveOnDomain(DependentString& docDomain, 66 bool EMSCRIPTEN_KEEPALIVE IsActiveOnDomain(DependentString& docDomain,
69 const String& sitekey) const; 67 const String& sitekey) const;
70 bool EMSCRIPTEN_KEEPALIVE IsActiveOnlyOnDomain(DependentString& docDomain) con st; 68 bool EMSCRIPTEN_KEEPALIVE IsActiveOnlyOnDomain(DependentString& docDomain) con st;
71 bool EMSCRIPTEN_KEEPALIVE IsGeneric() const; 69 bool EMSCRIPTEN_KEEPALIVE IsGeneric() const;
72 OwnedString EMSCRIPTEN_KEEPALIVE Serialize() const; 70 OwnedString EMSCRIPTEN_KEEPALIVE Serialize() const;
73 }; 71 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld