LEFT | RIGHT |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginFilter.h" | 3 #include "PluginFilter.h" |
4 | 4 |
5 #if (defined PRODUCT_ADBLOCKPLUS) | 5 #if (defined PRODUCT_ADBLOCKPLUS) |
6 #include "PluginSettings.h" | 6 #include "PluginSettings.h" |
7 #include "PluginClient.h" | 7 #include "PluginClient.h" |
8 #include "PluginClientFactory.h" | 8 #include "PluginClientFactory.h" |
9 #endif | 9 #endif |
10 | 10 |
11 #include "PluginMutex.h" | 11 #include "PluginMutex.h" |
12 #include "PluginHttpRequest.h" | 12 #include "PluginHttpRequest.h" |
13 #include "PluginSettings.h" | 13 #include "PluginSettings.h" |
14 #include "PluginSystem.h" | 14 #include "PluginSystem.h" |
15 #include "PluginClass.h" | 15 #include "PluginClass.h" |
16 #include "mlang.h" | 16 #include "mlang.h" |
| 17 |
| 18 #include "..\shared\CriticalSection.h" |
17 | 19 |
18 | 20 |
19 // The filters are described at http://adblockplus.org/en/filters | 21 // The filters are described at http://adblockplus.org/en/filters |
20 | 22 |
21 static CriticalSection s_criticalSectionFilterMap; | 23 static CriticalSection s_criticalSectionFilterMap; |
22 | 24 |
23 // ============================================================================ | 25 // ============================================================================ |
24 // CFilterElementHideAttrSelector | 26 // CFilterElementHideAttrSelector |
25 // ============================================================================ | 27 // ============================================================================ |
26 | 28 |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 | 731 |
730 std::string domainMb = CT2CA(domain); | 732 std::string domainMb = CT2CA(domain); |
731 | 733 |
732 if (client->Matches(url, contentTypeString, domainMb)) | 734 if (client->Matches(url, contentTypeString, domainMb)) |
733 { | 735 { |
734 if (addDebug) | 736 if (addDebug) |
735 { | 737 { |
736 DEBUG_FILTER("Filter::ShouldBlock " + type + " YES") | 738 DEBUG_FILTER("Filter::ShouldBlock " + type + " YES") |
737 | 739 |
738 #ifdef ENABLE_DEBUG_RESULT | 740 #ifdef ENABLE_DEBUG_RESULT |
739 CPluginDebug::DebugResultBlocking(type, src); | 741 CPluginDebug::DebugResultBlocking(type, src, domain); |
740 #endif | 742 #endif |
741 } | 743 } |
742 return true; | 744 return true; |
743 } | 745 } |
744 return false; | 746 return false; |
745 } | 747 } |
746 | 748 |
747 int CPluginFilter::FindMatch(const CString& src, CString filterPart, int srcStar
tPos) const | 749 int CPluginFilter::FindMatch(const CString& src, CString filterPart, int srcStar
tPos) const |
748 { | 750 { |
749 int filterCurrentPos = filterPart.Find('^'); | 751 int filterCurrentPos = filterPart.Find('^'); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 if (pos > 0 && domain.GetLength() + pos == subdomain.GetLength()) | 890 if (pos > 0 && domain.GetLength() + pos == subdomain.GetLength()) |
889 { | 891 { |
890 if (subdomain.GetAt(pos - 1) == '.') | 892 if (subdomain.GetAt(pos - 1) == '.') |
891 { | 893 { |
892 return true; | 894 return true; |
893 } | 895 } |
894 } | 896 } |
895 | 897 |
896 return false; | 898 return false; |
897 } | 899 } |
LEFT | RIGHT |