OLD | NEW |
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 break; | 435 break; |
436 } | 436 } |
437 if (hr != S_OK) | 437 if (hr != S_OK) |
438 return false; | 438 return false; |
439 return m_predecessor->IsMatchFilterElementHide(pDomPredecessor); | 439 return m_predecessor->IsMatchFilterElementHide(pDomPredecessor); |
440 } | 440 } |
441 | 441 |
442 return true; | 442 return true; |
443 } | 443 } |
444 | 444 |
445 | |
446 | |
447 // ============================================================================ | 445 // ============================================================================ |
448 // CPluginFilter | 446 // CPluginFilter |
449 // ============================================================================ | 447 // ============================================================================ |
450 | 448 |
451 CPluginFilter::CPluginFilter(const std::wstring& dataPath) | 449 CPluginFilter::CPluginFilter() |
452 : m_dataPath(dataPath) | |
453 { | 450 { |
454 ClearFilters(); | 451 ClearFilters(); |
455 } | 452 } |
456 | 453 |
457 | |
458 bool CPluginFilter::AddFilterElementHide(std::wstring filterText) | 454 bool CPluginFilter::AddFilterElementHide(std::wstring filterText) |
459 { | 455 { |
460 DEBUG_FILTER(L"Input: " + filterText + L" filterFile" + filterFile); | 456 DEBUG_FILTER(L"Input: " + filterText + L" filterFile" + filterFile); |
461 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); | 457 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); |
462 { | 458 { |
463 // Create filter descriptor | 459 // Create filter descriptor |
464 std::auto_ptr<CFilterElementHide> filter; | 460 std::auto_ptr<CFilterElementHide> filter; |
465 wchar_t separatorChar; | 461 wchar_t separatorChar; |
466 do | 462 do |
467 { | 463 { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 651 |
656 void CPluginFilter::ClearFilters() | 652 void CPluginFilter::ClearFilters() |
657 { | 653 { |
658 // Clear filter maps | 654 // Clear filter maps |
659 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); | 655 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); |
660 m_elementHideTags.clear(); | 656 m_elementHideTags.clear(); |
661 m_elementHideTagsId.clear(); | 657 m_elementHideTagsId.clear(); |
662 m_elementHideTagsClass.clear(); | 658 m_elementHideTagsClass.clear(); |
663 } | 659 } |
664 | 660 |
OLD | NEW |