LEFT | RIGHT |
1 #include <AdblockPlus.h> | 1 #include <AdblockPlus.h> |
2 #include <functional> | 2 #include <functional> |
3 #include <vector> | 3 #include <vector> |
4 #include <thread> | 4 #include <thread> |
5 #include <Windows.h> | 5 #include <Windows.h> |
6 | 6 |
7 #include "../shared/AutoHandle.h" | 7 #include "../shared/AutoHandle.h" |
8 #include "../shared/Communication.h" | 8 #include "../shared/Communication.h" |
9 #include "../shared/Dictionary.h" | 9 #include "../shared/Dictionary.h" |
10 #include "../shared/Utils.h" | 10 #include "../shared/Utils.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 case Communication::PROC_IS_WHITELISTED_URL: | 191 case Communication::PROC_IS_WHITELISTED_URL: |
192 { | 192 { |
193 std::string url; | 193 std::string url; |
194 request >> url; | 194 request >> url; |
195 AdblockPlus::FilterPtr match = filterEngine->Matches(url, "DOCUMENT", ur
l); | 195 AdblockPlus::FilterPtr match = filterEngine->Matches(url, "DOCUMENT", ur
l); |
196 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE
PTION); | 196 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE
PTION); |
197 break; | 197 break; |
198 } | 198 } |
199 case Communication::PROC_IS_ELEMHIDE_WHITELISTED_ON_URL: | 199 case Communication::PROC_IS_ELEMHIDE_WHITELISTED_ON_URL: |
200 { | 200 { |
201 std::string documentUrl; | 201 std::string url; |
202 request >> documentUrl; | 202 request >> url; |
203 AdblockPlus::FilterPtr match = filterEngine->Matches(documentUrl, "ELEMH
IDE", documentUrl); | 203 AdblockPlus::FilterPtr match = filterEngine->Matches(url, "ELEMHIDE", ur
l); |
204 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE
PTION); | 204 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE
PTION); |
205 break; | 205 break; |
206 } | 206 } |
207 case Communication::PROC_ADD_FILTER: | 207 case Communication::PROC_ADD_FILTER: |
208 { | 208 { |
209 std::string text; | 209 std::string text; |
210 request >> text; | 210 request >> text; |
211 | 211 |
212 filterEngine->GetFilter(text)->AddToList(); | 212 filterEngine->GetFilter(text)->AddToList(); |
213 break; | 213 break; |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 } | 484 } |
485 catch (const std::runtime_error& e) | 485 catch (const std::runtime_error& e) |
486 { | 486 { |
487 DebugException(e); | 487 DebugException(e); |
488 return 1; | 488 return 1; |
489 } | 489 } |
490 } | 490 } |
491 | 491 |
492 return 0; | 492 return 0; |
493 } | 493 } |
LEFT | RIGHT |