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

Unified Diff: src/plugin/PluginDomTraverserBase.h

Issue 5070706781978624: Issue #276 - introduce class BSTR_Argument (Closed)
Patch Set: Created July 29, 2014, 4:58 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginDomTraverserBase.h
===================================================================
--- a/src/plugin/PluginDomTraverserBase.h
+++ b/src/plugin/PluginDomTraverserBase.h
@@ -1,11 +1,10 @@
#ifndef _PLUGIN_DOM_TRAVERSER_BASE_H_
#define _PLUGIN_DOM_TRAVERSER_BASE_H_
-
+#include "COM_Value.h"
#include "PluginTypedef.h"
#include "PluginTab.h"
-
class CPluginDomTraverserCacheBase
{
public:
@@ -222,12 +221,11 @@
CComQIPtr<IWebBrowser2> pFrameBrowser = pFrameDispatch;
if (pFrameBrowser)
{
- CComBSTR bstrSrc;
CString src;
-
- if (SUCCEEDED(pFrameBrowser->get_LocationURL(&bstrSrc)))
+ AdblockPlus::COM::BSTR_Argument result;
+ if (SUCCEEDED(pFrameBrowser->get_LocationURL(&result)))
{
- src = bstrSrc;
+ src = to_CString(result);
CPluginClient::UnescapeUrl(src);
}
@@ -372,13 +370,13 @@
m_criticalSection.Unlock();
// Get tag
- CComBSTR bstrTag;
- if (FAILED(pEl->get_tagName(&bstrTag)) || !bstrTag)
+ AdblockPlus::COM::BSTR_Argument result;
+ if (FAILED(pEl->get_tagName(&result)) || !result.operator std::wstring().empty())
{
return;
}
- CString tag = bstrTag;
+ CString tag = to_CString(result);
tag.MakeLower();
// Custom OnElement
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld