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

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

Issue 5115380229996544: Issue 1104 - Cannot uncheck Disable on website option in tool bar (Closed)
Patch Set: rename and rebase Created March 13, 2015, 4:48 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 | src/plugin/AdblockPlusClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 !text.compare(text.size() - suffixLen, suffixLen, suffix)) 192 !text.compare(text.size() - suffixLen, suffixLen, suffix))
193 { 193 {
194 domains.push_back(text.substr(prefixLen, text.size() - prefixLen - suffixLen)); 194 domains.push_back(text.substr(prefixLen, text.size() - prefixLen - suffixLen));
195 } 195 }
196 } 196 }
197 } 197 }
198 198
199 response << domains; 199 response << domains;
200 break; 200 break;
201 } 201 }
202 case Communication::PROC_IS_WHITELISTED_URL: 202 case Communication::PROC_GET_WHITELISTING_FITER:
203 { 203 {
204 std::string url; 204 std::string url;
205 request >> url; 205 request >> url;
206 AdblockPlus::FilterPtr match = filterEngine->Matches(url, 206 AdblockPlus::FilterPtr match = filterEngine->Matches(url,
207 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_DOCUMENT, url); 207 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_DOCUMENT, url);
208 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE PTION); 208 std::string filterText;
209 if (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCEPTION)
210 {
211 filterText = match->GetProperty("text")->AsString();
212 }
213 response << filterText;
209 break; 214 break;
210 } 215 }
211 case Communication::PROC_IS_ELEMHIDE_WHITELISTED_ON_URL: 216 case Communication::PROC_IS_ELEMHIDE_WHITELISTED_ON_URL:
212 { 217 {
213 std::string url; 218 std::string url;
214 request >> url; 219 request >> url;
215 AdblockPlus::FilterPtr match = filterEngine->Matches(url, 220 AdblockPlus::FilterPtr match = filterEngine->Matches(url,
216 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_ELEMHIDE, url); 221 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_ELEMHIDE, url);
217 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE PTION); 222 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE PTION);
218 break; 223 break;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 502 }
498 catch (const std::runtime_error& e) 503 catch (const std::runtime_error& e)
499 { 504 {
500 DebugException(e); 505 DebugException(e);
501 return 1; 506 return 1;
502 } 507 }
503 } 508 }
504 509
505 return 0; 510 return 0;
506 } 511 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/AdblockPlusClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld