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

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

Issue 10955040: Fix domain whitelisting and remove unused code (Closed)
Left Patch Set: Created June 25, 2013, 9:42 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:
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 "PluginSettings.h" 3 #include "PluginSettings.h"
4 #include "PluginSystem.h" 4 #include "PluginSystem.h"
5 #include "PluginFilter.h" 5 #include "PluginFilter.h"
6 #include "PluginClientFactory.h" 6 #include "PluginClientFactory.h"
7 #include "PluginHttpRequest.h" 7 #include "PluginHttpRequest.h"
8 #include "PluginMutex.h" 8 #include "PluginMutex.h"
9 #include "PluginClass.h" 9 #include "PluginClass.h"
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 { 194 {
195 bool isHidden; 195 bool isHidden;
196 m_criticalSectionFilter.Lock(); 196 m_criticalSectionFilter.Lock();
197 { 197 {
198 isHidden = filter && filter->IsElementHidden(tag, pEl, domain, indent); 198 isHidden = filter && filter->IsElementHidden(tag, pEl, domain, indent);
199 } 199 }
200 m_criticalSectionFilter.Unlock(); 200 m_criticalSectionFilter.Unlock();
201 return isHidden; 201 return isHidden;
202 } 202 }
203 203
204 bool CAdblockPlusClient::IsUrlWhiteListed(const CString& url) 204 bool CAdblockPlusClient::IsWhitelistedUrl(const std::string& url)
Felix Dahlke 2013/06/25 09:46:58 Do you think I should change this to accept an std
Wladimir Palant 2013/06/25 12:00:40 Yes, that would be nice - we should be gradually m
Wladimir Palant 2013/06/25 18:03:58 I would actually expect to see std::wstring here -
Felix Dahlke 2013/06/26 09:32:55 Yes, that seems to make more sense, since the plug
Wladimir Palant 2013/06/27 05:55:02 Yes, the other methods seem wrong as well. I'm fin
205 { 205 {
206 Communication::OutputBuffer request; 206 Communication::OutputBuffer request;
207 request << Communication::PROC_IS_WHITELISTED_URL << ToUtf8String(std::wstring (url)); 207 request << Communication::PROC_IS_WHITELISTED_URL << url;
208 208
209 try 209 try
210 { 210 {
211 Communication::InputBuffer response = CallAdblockPlusEngineProcedure(request ); 211 Communication::InputBuffer response = CallAdblockPlusEngineProcedure(request );
212 212
213 bool isWhitelisted; 213 bool isWhitelisted;
214 response >> isWhitelisted; 214 response >> isWhitelisted;
215 return isWhitelisted; 215 return isWhitelisted;
216 } 216 }
217 catch (const std::exception& e) 217 catch (const std::exception& e)
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 try 371 try
372 { 372 {
373 CallAdblockPlusEngineProcedure(request); 373 CallAdblockPlusEngineProcedure(request);
374 } 374 }
375 catch (const std::exception& e) 375 catch (const std::exception& e)
376 { 376 {
377 DEBUG_GENERAL(e.what()); 377 DEBUG_GENERAL(e.what());
378 } 378 }
379 } 379 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld