Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/plugin/PluginFilter.cpp

Issue 11012013: Hanging resolved (critical sections unlocking) (Closed)
Left Patch Set: Using CriticalSection class instead Created June 17, 2013, 10:03 a.m.
Right Patch Set: Comments addressed Created June 25, 2013, 11:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/PluginFilter.h ('k') | src/shared/CriticalSection.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld