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

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

Issue 5115380229996544: Issue 1104 - Cannot uncheck Disable on website option in tool bar (Closed)
Left Patch Set: Created March 4, 2015, 12:24 p.m.
Right 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:
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 /* 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 std::string filterText; 208 std::string filterText;
209 if (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCEPTION) 209 if (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCEPTION)
210 { 210 {
211 filterText = match->GetProperty("text")->AsString(); 211 filterText = match->GetProperty("text")->AsString();
212 } 212 }
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 502 }
503 catch (const std::runtime_error& e) 503 catch (const std::runtime_error& e)
504 { 504 {
505 DebugException(e); 505 DebugException(e);
506 return 1; 506 return 1;
507 } 507 }
508 } 508 }
509 509
510 return 0; 510 return 0;
511 } 511 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld