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

Delta Between Two Patch Sets: src/plugin/PluginDomTraverserBase.h

Issue 29332057: Issue #1234 - Replace CString in the traverser (Closed)
Left Patch Set: rebase Created Dec. 14, 2015, 11:56 a.m.
Right Patch Set: documentUrl arguments Created Dec. 14, 2015, 1:25 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/AdblockPlusDomTraverser.cpp ('k') | src/plugin/PluginUtil.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 24 matching lines...) Expand all
35 class CPluginDomTraverserBase 35 class CPluginDomTraverserBase
36 { 36 {
37 37
38 public: 38 public:
39 39
40 CPluginDomTraverserBase(CPluginTab* tab); 40 CPluginDomTraverserBase(CPluginTab* tab);
41 ~CPluginDomTraverserBase(); 41 ~CPluginDomTraverserBase();
42 42
43 void TraverseHeader(bool isHeaderTraversed); 43 void TraverseHeader(bool isHeaderTraversed);
44 44
45 void TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, cons t std::wstring& documentName); 45 void TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, cons t std::wstring& documentUrl);
46 void TraverseSubdocument(IWebBrowser2* pBrowser, const std::wstring& domain); 46 void TraverseSubdocument(IWebBrowser2* pBrowser, const std::wstring& domain, c onst std::wstring& documentUrl);
47 47
48 virtual void ClearCache(); 48 virtual void ClearCache();
49 49
50 protected: 50 protected:
51 51
52 virtual bool OnIFrame(IHTMLElement* pEl, const std::wstring& url, const std::w string& indent) { return true; } 52 virtual bool OnIFrame(IHTMLElement* pEl, const std::wstring& url, const std::w string& indent) { return true; }
53 virtual bool OnElement(IHTMLElement* pEl, const std::wstring& tag, T* cache, b ool isDebug, const std::wstring& indent) { return true; } 53 virtual bool OnElement(IHTMLElement* pEl, const std::wstring& tag, T* cache, b ool isDebug, const std::wstring& indent) { return true; }
54 54
55 virtual bool IsEnabled(); 55 virtual bool IsEnabled();
56 56
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 delete [] m_cacheElements; 94 delete [] m_cacheElements;
95 } 95 }
96 96
97 template <class T> 97 template <class T>
98 void CPluginDomTraverserBase<T>::TraverseHeader(bool isHeaderTraversed) 98 void CPluginDomTraverserBase<T>::TraverseHeader(bool isHeaderTraversed)
99 { 99 {
100 m_isHeaderTraversed = isHeaderTraversed; 100 m_isHeaderTraversed = isHeaderTraversed;
101 } 101 }
102 102
103 template <class T> 103 template <class T>
104 void CPluginDomTraverserBase<T>::TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentName) 104 void CPluginDomTraverserBase<T>::TraverseDocument(IWebBrowser2* pBrowser, const std::wstring& domain, const std::wstring& documentUrl)
105 { 105 {
106 m_domain = domain; 106 m_domain = domain;
107 107
108 TraverseDocument(pBrowser, true, L""); 108 TraverseDocument(pBrowser, true, L"");
109 } 109 }
110 110
111 111
112 template <class T> 112 template <class T>
113 void CPluginDomTraverserBase<T>::TraverseSubdocument(IWebBrowser2* pBrowser, con st std::wstring& domain) 113 void CPluginDomTraverserBase<T>::TraverseSubdocument(IWebBrowser2* pBrowser, con st std::wstring& domain, const std::wstring& documentUrl)
114 { 114 {
115 m_domain = domain; 115 m_domain = domain;
116 116
117 TraverseDocument(pBrowser, false, L""); 117 TraverseDocument(pBrowser, false, L"");
118 } 118 }
119 119
120 120
121 template <class T> 121 template <class T>
122 bool CPluginDomTraverserBase<T>::IsEnabled() 122 bool CPluginDomTraverserBase<T>::IsEnabled()
123 { 123 {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 { 454 {
455 m_cacheIndexLast = 0; 455 m_cacheIndexLast = 0;
456 m_cacheDocumentHasFrames.clear(); 456 m_cacheDocumentHasFrames.clear();
457 m_cacheDocumentHasIframes.clear(); 457 m_cacheDocumentHasIframes.clear();
458 } 458 }
459 m_criticalSection.Unlock(); 459 m_criticalSection.Unlock();
460 } 460 }
461 461
462 462
463 #endif // _PLUGIN_DOM_TRAVERSER_BASE_H_ 463 #endif // _PLUGIN_DOM_TRAVERSER_BASE_H_
LEFTRIGHT

Powered by Google App Engine
This is Rietveld