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

Side by Side Diff: src/plugin/AdblockPlusDomTraverser.cpp

Issue 6390087684194304: [superseded] Issue 1265 - Improve detection of mime type of the expected response (Closed)
Patch Set: Created Sept. 10, 2014, 7:34 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 posEnd = posBegin >= 0 ? sObjectHtml.Find(L"\"", posBegin + 7) : -1; 102 posEnd = posBegin >= 0 ? sObjectHtml.Find(L"\"", posBegin + 7) : -1;
103 } 103 }
104 } 104 }
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
115 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(std::wstring(m_domain)); 114 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(std::wstring(m_domain));
116 } 115 }
117 116
118 117
119 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst CString& url, bool isDebug, CString& indent) 118 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst CString& url, bool isDebug, CString& indent)
120 { 119 {
121 CComPtr<IHTMLStyle> pStyle; 120 CComPtr<IHTMLStyle> pStyle;
122 121
123 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle) 122 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle)
124 { 123 {
(...skipping 12 matching lines...) Expand all
137 136
138 #ifdef ENABLE_DEBUG_RESULT 137 #ifdef ENABLE_DEBUG_RESULT
139 if (isDebug) 138 if (isDebug)
140 { 139 {
141 CPluginDebug::DebugResultHiding(type, url, "-"); 140 CPluginDebug::DebugResultHiding(type, url, "-");
142 } 141 }
143 #endif // ENABLE_DEBUG_RESULT 142 #endif // ENABLE_DEBUG_RESULT
144 } 143 }
145 } 144 }
146 } 145 }
OLDNEW

Powered by Google App Engine
This is Rietveld