OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginFilter.h" | 3 #include "PluginFilter.h" |
4 | |
5 #if (defined PRODUCT_ADBLOCKPLUS) | |
6 #include "PluginSettings.h" | 4 #include "PluginSettings.h" |
7 #include "PluginClient.h" | 5 #include "PluginClient.h" |
8 #include "PluginClientFactory.h" | 6 #include "PluginClientFactory.h" |
9 #endif | |
10 | |
11 #include "PluginMutex.h" | 7 #include "PluginMutex.h" |
12 #include "PluginSettings.h" | 8 #include "PluginSettings.h" |
13 #include "PluginSystem.h" | 9 #include "PluginSystem.h" |
14 #include "PluginClass.h" | 10 #include "PluginClass.h" |
15 #include "mlang.h" | 11 #include "mlang.h" |
16 | 12 |
17 #include "..\shared\CriticalSection.h" | 13 #include "..\shared\CriticalSection.h" |
18 | 14 |
19 | 15 |
20 // The filters are described at http://adblockplus.org/en/filters | 16 // The filters are described at http://adblockplus.org/en/filters |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 return true; | 607 return true; |
612 } | 608 } |
613 } | 609 } |
614 } | 610 } |
615 | 611 |
616 return false; | 612 return false; |
617 } | 613 } |
618 | 614 |
619 bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) | 615 bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) |
620 { | 616 { |
621 | |
622 ClearFilters(); | 617 ClearFilters(); |
623 | |
624 bool isRead = false; | 618 bool isRead = false; |
625 | |
626 #ifdef PRODUCT_ADBLOCKPLUS | |
627 CPluginClient* client = CPluginClient::GetInstance(); | 619 CPluginClient* client = CPluginClient::GetInstance(); |
628 #endif | |
629 | 620 |
630 // Parse hide string | 621 // Parse hide string |
631 int pos = 0; | 622 int pos = 0; |
632 | |
633 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); | 623 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); |
634 { | 624 { |
635 for (std::vector<std::wstring>::iterator it = filters.begin(); it < filters.
end(); ++it) | 625 for (std::vector<std::wstring>::iterator it = filters.begin(); it < filters.
end(); ++it) |
636 { | 626 { |
637 CString filter((*it).c_str()); | 627 CString filter((*it).c_str()); |
638 // If the line is not commented out | 628 // If the line is not commented out |
639 if (!filter.Trim().IsEmpty() && filter.GetAt(0) != '!' && filter.GetAt(0)
!= '[') | 629 if (!filter.Trim().IsEmpty() && filter.GetAt(0) != '!' && filter.GetAt(0)
!= '[') |
640 { | 630 { |
641 int filterType = 0; | 631 int filterType = 0; |
642 | 632 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 DEBUG_FILTER("Filter::ShouldBlock " + type + " YES") | 700 DEBUG_FILTER("Filter::ShouldBlock " + type + " YES") |
711 | 701 |
712 #ifdef ENABLE_DEBUG_RESULT | 702 #ifdef ENABLE_DEBUG_RESULT |
713 CPluginDebug::DebugResultBlocking(type, src, domain); | 703 CPluginDebug::DebugResultBlocking(type, src, domain); |
714 #endif | 704 #endif |
715 } | 705 } |
716 return true; | 706 return true; |
717 } | 707 } |
718 return false; | 708 return false; |
719 } | 709 } |
OLD | NEW |