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

Unified Diff: src/plugin/PluginFilter.cpp

Issue 29333441: Noissue - Change 'CPluginFilter::ShouldBlock()' to local function (Closed)
Patch Set: Created Jan. 14, 2016, 2:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginFilter.cpp
===================================================================
--- a/src/plugin/PluginFilter.cpp
+++ b/src/plugin/PluginFilter.cpp
@@ -651,35 +651,3 @@
m_elementHideTagsClass.clear();
}
-bool CPluginFilter::ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentType contentType, const std::wstring& domain, bool addDebug) const
-{
- std::wstring srcTrimmed = TrimString(src);
-
- // We should not block the empty string, so all filtering does not make sense
- // Therefore we just return
- if (srcTrimmed.empty())
- {
- return false;
- }
-
- CPluginSettings* settings = CPluginSettings::GetInstance();
-
- CPluginClient* client = CPluginClient::GetInstance();
- bool result = client->Matches(srcTrimmed, contentType, domain);
-
-#ifdef ENABLE_DEBUG_RESULT
- if (addDebug)
- {
- std::wstring type = ToUtf16String(AdblockPlus::FilterEngine::ContentTypeToString(contentType));
- if (result)
- {
- CPluginDebug::DebugResultBlocking(type, srcTrimmed, domain);
- }
- else
- {
- CPluginDebug::DebugResultIgnoring(type, srcTrimmed, domain);
- }
- }
-#endif
- return result;
-}
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld