| OLD | NEW |
| 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 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 } | 675 } |
| 676 m_filterMapDefault[i].clear(); | 676 m_filterMapDefault[i].clear(); |
| 677 } | 677 } |
| 678 | 678 |
| 679 m_elementHideTags.clear(); | 679 m_elementHideTags.clear(); |
| 680 m_elementHideTagsId.clear(); | 680 m_elementHideTagsId.clear(); |
| 681 m_elementHideTagsClass.clear(); | 681 m_elementHideTagsClass.clear(); |
| 682 } | 682 } |
| 683 } | 683 } |
| 684 | 684 |
| 685 | |
| 686 bool CPluginFilter::ShouldWhiteList(CString src) const | |
| 687 { | |
| 688 // We should not block the empty string, so all filtering does not make sense | |
| 689 // Therefore we just return | |
| 690 if (src.Trim().IsEmpty()) | |
| 691 { | |
| 692 return false; | |
| 693 } | |
| 694 | |
| 695 //TODO: Implement whitelisting check from libadblockplus here. Probably not ne
eded anymore | |
| 696 return false; | |
| 697 } | |
| 698 | |
| 699 | |
| 700 bool CPluginFilter::ShouldBlock(CString src, int contentType, const CString& dom
ain, bool addDebug) const | 685 bool CPluginFilter::ShouldBlock(CString src, int contentType, const CString& dom
ain, bool addDebug) const |
| 701 { | 686 { |
| 702 // We should not block the empty string, so all filtering does not make sense | 687 // We should not block the empty string, so all filtering does not make sense |
| 703 // Therefore we just return | 688 // Therefore we just return |
| 704 if (src.Trim().IsEmpty()) | 689 if (src.Trim().IsEmpty()) |
| 705 { | 690 { |
| 706 return false; | 691 return false; |
| 707 } | 692 } |
| 708 | 693 |
| 709 CPluginSettings* settings = CPluginSettings::GetInstance(); | 694 CPluginSettings* settings = CPluginSettings::GetInstance(); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 if (pos > 0 && domain.GetLength() + pos == subdomain.GetLength()) | 873 if (pos > 0 && domain.GetLength() + pos == subdomain.GetLength()) |
| 889 { | 874 { |
| 890 if (subdomain.GetAt(pos - 1) == '.') | 875 if (subdomain.GetAt(pos - 1) == '.') |
| 891 { | 876 { |
| 892 return true; | 877 return true; |
| 893 } | 878 } |
| 894 } | 879 } |
| 895 | 880 |
| 896 return false; | 881 return false; |
| 897 } | 882 } |
| OLD | NEW |