Index: src/plugin/PluginFilter.cpp |
diff --git a/src/plugin/PluginFilter.cpp b/src/plugin/PluginFilter.cpp |
index f4172affdcc0a135b16c1ac0abceab3ea0ca2023..7dc41ffb081a98e65a31e156cafd968cb7c6a555 100644 |
--- a/src/plugin/PluginFilter.cpp |
+++ b/src/plugin/PluginFilter.cpp |
@@ -605,9 +605,10 @@ bool CPluginFilter::IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, |
return false; |
} |
-bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) |
+bool CPluginFilter::LoadHideFilters(const std::vector<std::wstring>& filters) |
{ |
ClearFilters(); |
+ m_hideFilters = filters; |
bool isRead = false; |
CPluginClient* client = CPluginClient::GetInstance(); |
@@ -615,7 +616,7 @@ bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) |
int pos = 0; |
CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); |
{ |
- for (std::vector<std::wstring>::iterator it = filters.begin(); it < filters.end(); ++it) |
+ for (auto it = filters.begin(); it < filters.end(); ++it) |
{ |
CString filter((*it).c_str()); |
// If the line is not commented out |
@@ -649,5 +650,11 @@ void CPluginFilter::ClearFilters() |
m_elementHideTags.clear(); |
m_elementHideTagsId.clear(); |
m_elementHideTagsClass.clear(); |
+ m_hideFilters.clear(); |
} |
+const std::vector<std::wstring>& CPluginFilter::GetHideFilters() const |
+{ |
+ DWORD res = WaitForSingleObject(hideFiltersLoadedEvent, ENGINE_STARTUP_TIMEOUT); |
+ return m_hideFilters; |
+} |