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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #include "PluginStdAfx.h" | 18 #include "PluginStdAfx.h" |
19 #include "AdblockPlusClient.h" | 19 #include "AdblockPlusClient.h" |
20 #include "PluginFilter.h" | 20 #include "PluginFilter.h" |
21 #include "PluginSettings.h" | 21 #include "PluginSettings.h" |
22 #include "PluginMutex.h" | 22 #include "PluginMutex.h" |
23 #include "PluginSettings.h" | 23 #include "PluginSettings.h" |
24 #include "PluginSystem.h" | 24 #include "PluginSystem.h" |
25 #include "PluginClass.h" | 25 #include "PluginClass.h" |
| 26 #include "PluginUtil.h" |
26 #include "mlang.h" | 27 #include "mlang.h" |
27 #include "TokenSequence.h" | 28 #include "TokenSequence.h" |
28 #include "..\shared\CriticalSection.h" | 29 #include "..\shared\CriticalSection.h" |
29 #include "..\shared\Utils.h" | 30 #include "..\shared\Utils.h" |
30 #include "..\shared\MsHTMLUtils.h" | 31 #include "..\shared\MsHTMLUtils.h" |
31 | 32 |
32 // The filters are described at http://adblockplus.org/en/filters | 33 // The filters are described at http://adblockplus.org/en/filters |
33 | 34 |
34 static CriticalSection s_criticalSectionFilterMap; | 35 static CriticalSection s_criticalSectionFilterMap; |
35 | 36 |
36 namespace | |
37 { | |
38 std::wstring ToLowerString(const std::wstring& s) | |
39 { | |
40 return ToWstring(ToCString(s).MakeLower()); | |
41 } | |
42 } | |
43 | |
44 // ============================================================================ | 37 // ============================================================================ |
45 // CFilterElementHide | 38 // CFilterElementHide |
46 // ============================================================================ | 39 // ============================================================================ |
47 namespace | 40 namespace |
48 { | 41 { |
49 class ElementHideParseException | 42 class ElementHideParseException |
50 : public std::runtime_error | 43 : public std::runtime_error |
51 { | 44 { |
52 std::string message(const std::wstring& filterText, const std::string& reaso
n) | 45 std::string message(const std::wstring& filterText, const std::string& reaso
n) |
53 { | 46 { |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 CPluginDebug::DebugResultBlocking(type, srcTrimmed, domain); | 684 CPluginDebug::DebugResultBlocking(type, srcTrimmed, domain); |
692 } | 685 } |
693 else | 686 else |
694 { | 687 { |
695 CPluginDebug::DebugResultIgnoring(type, srcTrimmed, domain); | 688 CPluginDebug::DebugResultIgnoring(type, srcTrimmed, domain); |
696 } | 689 } |
697 } | 690 } |
698 #endif | 691 #endif |
699 return result; | 692 return result; |
700 } | 693 } |
OLD | NEW |