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

Unified Diff: src/plugin/PluginDomTraverserBase.h

Issue 29331669: Issue 3237 - Whitelisted AFS ad is not shown on netzwelt.de (Closed)
Patch Set: Created Dec. 1, 2015, 2:15 a.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/PluginDomTraverserBase.h
===================================================================
--- a/src/plugin/PluginDomTraverserBase.h
+++ b/src/plugin/PluginDomTraverserBase.h
@@ -42,8 +42,8 @@
void TraverseHeader(bool isHeaderTraversed);
- void TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentName);
- void TraverseSubdocument(IWebBrowser2* pBrowser, const std::wstring& domain, const CString& documentName);
+ void TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentUrl);
+ void TraverseSubdocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentUrl);
virtual void ClearCache();
@@ -62,7 +62,7 @@
CComAutoCriticalSection m_criticalSection;
std::wstring m_domain;
- CString m_documentName;
+ std::wstring m_documentUrl;
bool m_isHeaderTraversed;
@@ -71,8 +71,8 @@
int m_cacheIndexLast;
int m_cacheElementsMax;
- std::set<CString> m_cacheDocumentHasFrames;
- std::set<CString> m_cacheDocumentHasIframes;
+ std::set<std::wstring> m_cacheDocumentHasFrames;
+ std::set<std::wstring> m_cacheDocumentHasIframes;
T* m_cacheElements;
@@ -101,19 +101,19 @@
}
template <class T>
-void CPluginDomTraverserBase<T>::TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentName)
+void CPluginDomTraverserBase<T>::TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentUrl)
{
m_domain = domain;
-
+ m_documentUrl = documentUrl;
TraverseDocument(pBrowser, true, "");
}
template <class T>
-void CPluginDomTraverserBase<T>::TraverseSubdocument(IWebBrowser2* pBrowser, const std::wstring& domain, const CString& documentName)
+void CPluginDomTraverserBase<T>::TraverseSubdocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentUrl)
{
m_domain = domain;
-
+ m_documentUrl = documentUrl;
TraverseDocument(pBrowser, false, "");
}
@@ -207,8 +207,8 @@
m_criticalSection.Lock();
{
- hasFrames = m_cacheDocumentHasFrames.find(m_documentName) != m_cacheDocumentHasFrames.end();
- hasIframes = m_cacheDocumentHasIframes.find(m_documentName) != m_cacheDocumentHasIframes.end();
+ hasFrames = m_cacheDocumentHasFrames.find(m_documentUrl) != m_cacheDocumentHasFrames.end();
+ hasIframes = m_cacheDocumentHasIframes.find(m_documentUrl) != m_cacheDocumentHasIframes.end();
}
m_criticalSection.Unlock();
@@ -399,7 +399,7 @@
{
m_criticalSection.Lock();
{
- m_cacheDocumentHasIframes.insert(m_documentName);
+ m_cacheDocumentHasIframes.insert(m_documentUrl);
}
m_criticalSection.Unlock();
}
@@ -407,7 +407,7 @@
{
m_criticalSection.Lock();
{
- m_cacheDocumentHasFrames.insert(m_documentName);
+ m_cacheDocumentHasFrames.insert(m_documentUrl);
}
m_criticalSection.Unlock();
}

Powered by Google App Engine
This is Rietveld