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

Delta Between Two Patch Sets: src/plugin/AdblockPlusDomTraverser.cpp

Issue 10955040: Fix domain whitelisting and remove unused code (Closed)
Left Patch Set: Created June 25, 2013, 10:21 a.m.
Right Patch Set: Addressed all issues Created June 25, 2013, 2:19 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
LEFTRIGHT
(no file at all)
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginClient.h" 3 #include "PluginClient.h"
4 #include "PluginFilter.h" 4 #include "PluginFilter.h"
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 6
7 #include "AdblockPlusDomTraverser.h" 7 #include "AdblockPlusDomTraverser.h"
8 8
9 9
10 CPluginDomTraverser::CPluginDomTraverser(CPluginTab* tab) : CPluginDomTraverserB ase(tab) 10 CPluginDomTraverser::CPluginDomTraverser(CPluginTab* tab) : CPluginDomTraverserB ase(tab)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 return true; 107 return true;
108 } 108 }
109 109
110 110
111 bool CPluginDomTraverser::IsEnabled() 111 bool CPluginDomTraverser::IsEnabled()
112 { 112 {
113 CPluginClient* client = CPluginClient::GetInstance(); 113 CPluginClient* client = CPluginClient::GetInstance();
114 114
115 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsUrlWhiteListed(m_domain); 115 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(ToUtf8String(std::wstring(m_domain)));
116 } 116 }
117 117
118 118
119 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst CString& url, bool isDebug, CString& indent) 119 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst CString& url, bool isDebug, CString& indent)
120 { 120 {
121 CComPtr<IHTMLStyle> pStyle; 121 CComPtr<IHTMLStyle> pStyle;
122 122
123 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle) 123 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle)
124 { 124 {
125 CComBSTR bstrDisplay; 125 CComBSTR bstrDisplay;
(...skipping 11 matching lines...) Expand all
137 137
138 #ifdef ENABLE_DEBUG_RESULT 138 #ifdef ENABLE_DEBUG_RESULT
139 if (isDebug) 139 if (isDebug)
140 { 140 {
141 CPluginDebug::DebugResultHiding(type, url, "-"); 141 CPluginDebug::DebugResultHiding(type, url, "-");
142 } 142 }
143 #endif // ENABLE_DEBUG_RESULT 143 #endif // ENABLE_DEBUG_RESULT
144 } 144 }
145 } 145 }
146 } 146 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld