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

Delta Between Two Patch Sets: src/engine/Main.cpp

Issue 4784041706389504: Issue 1183 - Fix Acceptable Ads hiding (Closed)
Left Patch Set: Addressed comments, reorganized the code Created Aug. 8, 2014, 4:37 p.m.
Right Patch Set: More addressing comments Created Aug. 8, 2014, 4:54 p.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 | « no previous file | src/plugin/AdblockPlusClient.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 <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
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;
Felix Dahlke 2014/08/08 16:41:45 Would make more sense to rename this to "url" IMO,
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld