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

Unified Diff: src/plugin/AdblockPlusClient.cpp

Issue 5163396739629056: Issue #1234 - Remove CString from ShouldBlock(), IsElementHidden() declarations (Closed)
Patch Set: Created Sept. 30, 2014, 5:37 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/AdblockPlusClient.h ('k') | src/plugin/AdblockPlusDomTraverser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/AdblockPlusClient.cpp
===================================================================
--- a/src/plugin/AdblockPlusClient.cpp
+++ b/src/plugin/AdblockPlusClient.cpp
@@ -208,18 +208,13 @@
return instance;
}
-
-bool CAdblockPlusClient::ShouldBlock(CString src, int contentType, const CString& domain, bool addDebug)
+bool CAdblockPlusClient::ShouldBlock(const std::wstring& src, int contentType, const std::wstring& domain, bool addDebug)
{
bool isBlocked = false;
-
bool isCached = false;
-
- CPluginSettings* settings = CPluginSettings::GetInstance();
-
m_criticalSectionCache.Lock();
{
- std::map<CString,bool>::iterator it = m_cacheBlockedSources.find(src);
+ auto it = m_cacheBlockedSources.find(src);
isCached = it != m_cacheBlockedSources.end();
if (isCached)
@@ -237,7 +232,6 @@
}
m_criticalSectionFilter.Unlock();
-
// Cache result, if content type is defined
if (contentType != CFilter::contentTypeAny)
{
@@ -248,12 +242,10 @@
m_criticalSectionCache.Unlock();
}
}
-
-
return isBlocked;
}
-bool CAdblockPlusClient::IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& domain, const CString& indent, CPluginFilter* filter)
+bool CAdblockPlusClient::IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::wstring& domain, const std::wstring& indent, CPluginFilter* filter)
{
bool isHidden;
m_criticalSectionFilter.Lock();
« no previous file with comments | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/AdblockPlusDomTraverser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld