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

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

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Left Patch Set: link addon with libadblockplus Created Jan. 29, 2015, 4:05 p.m.
Right Patch Set: rebase and remove member of CFilter Created Feb. 4, 2015, 12:50 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 | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/AdblockPlusDomTraverser.cpp » ('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 /* 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
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 return false; 300 return false;
301 301
302 bool isWhitelisted; 302 bool isWhitelisted;
303 response >> isWhitelisted; 303 response >> isWhitelisted;
304 return isWhitelisted; 304 return isWhitelisted;
305 } 305 }
306 306
307 bool CAdblockPlusClient::Matches(const std::wstring& url, AdblockPlus::FilterEng ine::ContentType contentType, const std::wstring& domain) 307 bool CAdblockPlusClient::Matches(const std::wstring& url, AdblockPlus::FilterEng ine::ContentType contentType, const std::wstring& domain)
308 { 308 {
309 Communication::OutputBuffer request; 309 Communication::OutputBuffer request;
310 request << Communication::PROC_MATCHES << ToUtf8String(url) << contentType << ToUtf8String(domain); 310 request << Communication::PROC_MATCHES << ToUtf8String(url) << static_cast<int 32_t>(contentType) << ToUtf8String(domain);
311 311
312 Communication::InputBuffer response; 312 Communication::InputBuffer response;
313 if (!CallEngine(request, response)) 313 if (!CallEngine(request, response))
314 return false; 314 return false;
315 315
316 bool match; 316 bool match;
317 response >> match; 317 response >> match;
318 return match; 318 return match;
319 } 319 }
320 320
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 DEBUG_GENERAL("CompareVersions"); 566 DEBUG_GENERAL("CompareVersions");
567 Communication::OutputBuffer request; 567 Communication::OutputBuffer request;
568 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2); 568 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2);
569 Communication::InputBuffer response; 569 Communication::InputBuffer response;
570 if (!CallEngine(request, response)) 570 if (!CallEngine(request, response))
571 return 0; 571 return 0;
572 int result; 572 int result;
573 response >> result; 573 response >> result;
574 return result; 574 return result;
575 } 575 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld