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 Aug. 7, 2014, 2:20 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
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();

Powered by Google App Engine
This is Rietveld