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

Unified Diff: src/plugin/PluginFilter.cpp

Issue 29334397: Issue #2230, #3391 - Load filters on "download begin" event
Patch Set: Created Jan. 22, 2016, 6:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/PluginFilter.cpp
===================================================================
--- a/src/plugin/PluginFilter.cpp
+++ b/src/plugin/PluginFilter.cpp
@@ -445,11 +445,6 @@
// CPluginFilter
// ============================================================================
-CPluginFilter::CPluginFilter()
-{
- ClearFilters();
-}
-
bool CPluginFilter::AddFilterElementHide(std::wstring filterText)
{
DEBUG_FILTER(L"Input: " + filterText + L" filterFile" + filterFile);
@@ -609,9 +604,9 @@
return false;
}
-bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters)
+bool CPluginFilter::LoadHideFilters()
{
- ClearFilters();
+ auto filters = CPluginClient::GetInstance()->GetElementHidingSelectors(domain);
bool isRead = false;
CPluginClient* client = CPluginClient::GetInstance();
@@ -645,13 +640,3 @@
return isRead;
}
-
-void CPluginFilter::ClearFilters()
-{
- // Clear filter maps
- CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap);
- m_elementHideTags.clear();
- m_elementHideTagsId.clear();
- m_elementHideTagsClass.clear();
-}
-

Powered by Google App Engine
This is Rietveld