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: address comments Created Feb. 3, 2016, 6:04 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
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | src/plugin/PluginTabBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
-}
-
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | src/plugin/PluginTabBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld