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

Side by Side Diff: src/engine/Main.cpp

Issue 5141513981919232: Issue 1160 - Fix acceptable ads not showing up sometimes (Closed)
Patch Set: Created Aug. 6, 2014, 2:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 request >> procedure; 85 request >> procedure;
86 switch (procedure) 86 switch (procedure)
87 { 87 {
88 case Communication::PROC_MATCHES: 88 case Communication::PROC_MATCHES:
89 { 89 {
90 std::string url; 90 std::string url;
91 std::string type; 91 std::string type;
92 std::string documentUrl; 92 std::string documentUrl;
93 request >> url >> type >> documentUrl; 93 request >> url >> type >> documentUrl;
94 referrerMapping.Add(url, documentUrl); 94 referrerMapping.Add(url, documentUrl);
95 AdblockPlus::FilterPtr filter = filterEngine->Matches(url, type, referre rMapping.BuildReferrerChain(url)); 95 AdblockPlus::FilterPtr filter = filterEngine->Matches(url, type, referre rMapping.BuildReferrerChain(documentUrl));
96 response << (filter && filter->GetType() != AdblockPlus::Filter::TYPE_EX CEPTION); 96 response << (filter && filter->GetType() != AdblockPlus::Filter::TYPE_EX CEPTION);
97 break; 97 break;
98 } 98 }
99 case Communication::PROC_GET_ELEMHIDE_SELECTORS: 99 case Communication::PROC_GET_ELEMHIDE_SELECTORS:
100 { 100 {
101 std::string domain; 101 std::string domain;
102 request >> domain; 102 request >> domain;
103 WriteStrings(response, filterEngine->GetElementHidingSelectors(domain)); 103 WriteStrings(response, filterEngine->GetElementHidingSelectors(domain));
104 break; 104 break;
105 } 105 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } 476 }
477 catch (const std::runtime_error& e) 477 catch (const std::runtime_error& e)
478 { 478 {
479 DebugException(e); 479 DebugException(e);
480 return 1; 480 return 1;
481 } 481 }
482 } 482 }
483 483
484 return 0; 484 return 0;
485 } 485 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld