| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 { | 123 { |
| 124 // (Tag,Name) -> Filter | 124 // (Tag,Name) -> Filter |
| 125 typedef std::multimap<std::pair<std::wstring, std::wstring>, CFilterElementHid e> TFilterElementHideTagsNamed; | 125 typedef std::multimap<std::pair<std::wstring, std::wstring>, CFilterElementHid e> TFilterElementHideTagsNamed; |
| 126 // Tag -> Filter | 126 // Tag -> Filter |
| 127 typedef std::multimap<std::wstring, CFilterElementHide> TFilterElementHideTags ; | 127 typedef std::multimap<std::wstring, CFilterElementHide> TFilterElementHideTags ; |
| 128 TFilterElementHideTagsNamed m_elementHideTagsId; | 128 TFilterElementHideTagsNamed m_elementHideTagsId; |
| 129 TFilterElementHideTagsNamed m_elementHideTagsClass; | 129 TFilterElementHideTagsNamed m_elementHideTagsClass; |
| 130 TFilterElementHideTags m_elementHideTags; | 130 TFilterElementHideTags m_elementHideTags; |
| 131 bool AddFilterElementHide(std::wstring filter); | 131 bool AddFilterElementHide(std::wstring filter); |
| 132 bool LoadHideFilters(); | 132 bool LoadHideFilters(); |
| 133 const std::wstring& domain; | 133 const std::wstring domain; |
|
sergei
2016/01/29 10:03:20
That's very dangerous, make it non-reference.
Eric
2016/02/03 18:03:20
Done.
| |
| 134 InitializerType Initializer() override | 134 InitializerType Initializer() override |
| 135 { | 135 { |
| 136 return [this] { LoadHideFilters(); }; | 136 return [this] { LoadHideFilters(); }; |
| 137 } | 137 } |
| 138 | 138 |
| 139 public: | 139 public: |
| 140 CPluginFilter(const std::wstring& domain) | 140 CPluginFilter(const std::wstring& domain) |
| 141 : domain(domain) | 141 : domain(domain) |
| 142 { | 142 { |
| 143 SpawnInitializer(); | 143 SpawnInitializer(); |
| 144 } | 144 } |
| 145 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent) const; | 145 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent) const; |
| 146 void EnsureInitialized() { DetachedInitializer::EnsureInitialized(); } | 146 void EnsureInitialized() { DetachedInitializer::EnsureInitialized(); } |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 | 149 |
| 150 #endif // _PLUGIN_FILTER_H_ | 150 #endif // _PLUGIN_FILTER_H_ |
| LEFT | RIGHT |