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