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

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

Issue 5070706781978624: Issue #276 - introduce class BSTR_Argument (Closed)
Left Patch Set: small correction over patch set 2 Created July 29, 2014, 7:22 p.m.
Right Patch Set: clarified documentation for operator&, updated to_wstring(CString) Created July 30, 2014, 2:13 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
« no previous file with change/comment | « src/plugin/PluginFilter.h ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginFilter.h" 3 #include "PluginFilter.h"
4 4
5 #include "COM_Value.h" 5 #include "COM_Value.h"
6 #if (defined PRODUCT_ADBLOCKPLUS) 6 #if (defined PRODUCT_ADBLOCKPLUS)
7 #include "PluginSettings.h" 7 #include "PluginSettings.h"
8 #include "PluginClient.h" 8 #include "PluginClient.h"
9 #include "PluginClientFactory.h" 9 #include "PluginClientFactory.h"
10 #endif 10 #endif
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 value = to_CString(id); 328 value = to_CString(id);
329 if (!value.IsEmpty()) 329 if (!value.IsEmpty())
330 { 330 {
331 attrFound = true; 331 attrFound = true;
332 } 332 }
333 } 333 }
334 } 334 }
335 else 335 else
336 { 336 {
337 CComVariant vAttr; 337 CComVariant vAttr;
338 CString attr = attrIt->m_attr; // temporary required because to_wstring c onversion cannot be const. 338 AdblockPlus::COM::BSTR_Argument attribute_name(to_wstring(attrIt->m_attr)) ;
339 AdblockPlus::COM::BSTR_Argument attribute_name(to_wstring(attr));
340 if (SUCCEEDED(pEl->getAttribute(attribute_name, 0, &vAttr))) 339 if (SUCCEEDED(pEl->getAttribute(attribute_name, 0, &vAttr)))
341 { 340 {
342 attrFound = true; 341 attrFound = true;
343 if (vAttr.vt == VT_BSTR) 342 if (vAttr.vt == VT_BSTR)
344 { 343 {
345 value = vAttr.bstrVal; 344 value = vAttr.bstrVal;
346 } 345 }
347 else if (vAttr.vt == VT_I4) 346 else if (vAttr.vt == VT_I4)
348 { 347 {
349 value.Format(L"%u", vAttr.iVal); 348 value.Format(L"%u", vAttr.iVal);
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 DEBUG_FILTER("Filter::ShouldBlock " + type + " YES") 720 DEBUG_FILTER("Filter::ShouldBlock " + type + " YES")
722 721
723 #ifdef ENABLE_DEBUG_RESULT 722 #ifdef ENABLE_DEBUG_RESULT
724 CPluginDebug::DebugResultBlocking(type, src, domain); 723 CPluginDebug::DebugResultBlocking(type, src, domain);
725 #endif 724 #endif
726 } 725 }
727 return true; 726 return true;
728 } 727 }
729 return false; 728 return false;
730 } 729 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld