| LEFT | RIGHT |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| LEFT | RIGHT |