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

Unified Diff: src/plugin/PluginFilter.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/PluginFilter.cpp
===================================================================
--- a/src/plugin/PluginFilter.cpp
+++ b/src/plugin/PluginFilter.cpp
@@ -504,8 +504,10 @@
return true;
}
-bool CPluginFilter::IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& domain, const CString& indent) const
+bool CPluginFilter::IsElementHidden(const std::wstring& tag_wstring, IHTMLElement* pEl, const std::wstring& domain, const std::wstring& indent) const
Felix Dahlke 2014/09/30 13:30:15 Since "CString tag" is temporary and "const std::w
Eric 2014/09/30 17:56:40 I was trying to minimize the number of changed lin
{
+ CString tag = to_CString(tag_wstring);
+
CString id;
CComBSTR bstrId;
if (SUCCEEDED(pEl->get_id(&bstrId)) && bstrId)
@@ -522,7 +524,7 @@
CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap);
{
- CString domainTest = domain;
+ CString domainTest = to_CString(domain);
// Search tag/id filters
if (!id.IsEmpty())
@@ -679,8 +681,11 @@
}
}
-bool CPluginFilter::ShouldBlock(CString src, int contentType, const CString& domain, bool addDebug) const
+bool CPluginFilter::ShouldBlock(const std::wstring& src_wstring, int contentType, const std::wstring& domain_wstring, bool addDebug) const
{
+ CString src = to_CString(src_wstring);
+ CString domain = to_CString(domain_wstring);
+
// We should not block the empty string, so all filtering does not make sense
// Therefore we just return
if (src.Trim().IsEmpty())

Powered by Google App Engine
This is Rietveld