Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Unified Diff: xfa/fde/xml/fde_xml_imp.h

Issue 2555373002: Use unique_ptr for CXFA_XMLParser. (Closed)
Patch Set: Alphabetize class Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/libfuzzer/pdf_xml_fuzzer.cc ('k') | xfa/fde/xml/fde_xml_imp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/xml/fde_xml_imp.h
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h
index 283184aadccc68bfe84b1d55da6089c941bd705d..8571f1b9f1ad03bb6266d645dc5f52f39fda87cd 100644
--- a/xfa/fde/xml/fde_xml_imp.h
+++ b/xfa/fde/xml/fde_xml_imp.h
@@ -7,6 +7,8 @@
#ifndef XFA_FDE_XML_FDE_XML_IMP_H_
#define XFA_FDE_XML_FDE_XML_IMP_H_
+#include <memory>
+
#include "core/fxcrt/fx_system.h"
#include "xfa/fde/xml/fde_xml.h"
#include "xfa/fgas/crt/fgas_memory.h"
@@ -19,8 +21,8 @@ class CFDE_XMLElement;
class CFDE_XMLText;
class CFDE_XMLDoc;
class CFDE_XMLDOMParser;
-class CFDE_XMLParser;
class CFDE_XMLSyntaxParser;
+class IFDE_XMLParser;
class CFDE_XMLNode : public CFX_Target {
public:
@@ -193,7 +195,7 @@ class CFDE_XMLDoc : public CFX_Target {
CFDE_XMLDoc();
~CFDE_XMLDoc() override;
- bool LoadXML(CFDE_XMLParser* pXMLParser);
+ bool LoadXML(std::unique_ptr<IFDE_XMLParser> pXMLParser);
int32_t DoLoad(IFX_Pause* pPause = nullptr);
void CloseXML();
CFDE_XMLNode* GetRoot() const { return m_pRoot; }
@@ -209,14 +211,12 @@ class CFDE_XMLDoc : public CFX_Target {
int32_t m_iStatus;
CFDE_XMLNode* m_pRoot;
CFDE_XMLSyntaxParser* m_pSyntaxParser;
- CFDE_XMLParser* m_pXMLParser;
+ std::unique_ptr<IFDE_XMLParser> m_pXMLParser;
};
-class CFDE_XMLParser {
+class IFDE_XMLParser {
public:
- virtual ~CFDE_XMLParser() {}
-
- virtual void Release() = 0;
+ virtual ~IFDE_XMLParser() {}
virtual int32_t DoParser(IFX_Pause* pPause) = 0;
};
« no previous file with comments | « testing/libfuzzer/pdf_xml_fuzzer.cc ('k') | xfa/fde/xml/fde_xml_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698