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

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

Issue 4912420225024000: Issue #1234 - Convert strings associated with URL's (Closed)
Left Patch Set: Created Oct. 21, 2014, 5:18 p.m.
Right Patch Set: Created Jan. 5, 2015, 4:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 posEnd = posBegin >= 0 ? sObjectHtml.Find(L"\"", posBegin + 7) : -1; 101 posEnd = posBegin >= 0 ? sObjectHtml.Find(L"\"", posBegin + 7) : -1;
102 } 102 }
103 } 103 }
104 } 104 }
105 105
106 return true; 106 return true;
107 } 107 }
108 108
109 109
110 bool CPluginDomTraverser::IsEnabled() 110 bool CPluginDomTraverser::IsEnabled()
111 { 111 {
112 CPluginClient* client = CPluginClient::GetInstance(); 112 CPluginClient* client = CPluginClient::GetInstance();
113
114 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(m_domain); 113 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(m_domain);
115 } 114 }
116 115
117 116
118 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst std::wstring& url, bool isDebug, CString& indent) 117 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst std::wstring& url, bool isDebug, CString& indent)
119 { 118 {
120 CComPtr<IHTMLStyle> pStyle; 119 CComPtr<IHTMLStyle> pStyle;
121 120
122 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle) 121 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle)
123 { 122 {
(...skipping 12 matching lines...) Expand all
136 135
137 #ifdef ENABLE_DEBUG_RESULT 136 #ifdef ENABLE_DEBUG_RESULT
138 if (isDebug) 137 if (isDebug)
139 { 138 {
140 CPluginDebug::DebugResultHiding(type, ToCString(url), "-"); 139 CPluginDebug::DebugResultHiding(type, ToCString(url), "-");
141 } 140 }
142 #endif // ENABLE_DEBUG_RESULT 141 #endif // ENABLE_DEBUG_RESULT
143 } 142 }
144 } 143 }
145 } 144 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld