summaryrefslogtreecommitdiff
path: root/core/include/fpdfdoc
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-11 13:54:33 -0700
committerLei Zhang <thestig@chromium.org>2015-08-11 13:54:33 -0700
commit1e2ece0cf98f8daecdea5b45ebd20cedbcef4bd9 (patch)
tree44f4cc23078cc1e324db1ed3892f1f5f26c2dc35 /core/include/fpdfdoc
parent3a3849176aa6e2db8baf2f9367b2d96c71815319 (diff)
downloadpdfium-1e2ece0cf98f8daecdea5b45ebd20cedbcef4bd9.tar.xz
Remove dead code from CPDF_Metadata. Add missing nullptr check.
BUG=pdfium:117 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1282653002 .
Diffstat (limited to 'core/include/fpdfdoc')
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index 18dc7aa064..13c52433cd 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -9,6 +9,7 @@
#include <map>
+#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fpdfapi/fpdf_parser.h"
#include "../fpdfapi/fpdf_render.h"
@@ -1151,23 +1152,19 @@ class CPDF_PageLabel {
protected:
CPDF_Document* m_pDocument;
};
+
class CPDF_Metadata {
public:
- CPDF_Metadata();
-
+ explicit CPDF_Metadata(CPDF_Document* pDoc);
~CPDF_Metadata();
- void LoadDoc(CPDF_Document* pDoc);
-
- int32_t GetString(const CFX_ByteStringC& bsItem, CFX_WideString& wsStr);
-
- CXML_Element* GetRoot() const;
+ const CXML_Element* GetRoot() const;
- CXML_Element* GetRDF() const;
-
- protected:
- void* m_pData;
+ private:
+ CPDF_Document* const m_pDoc; // Not owned.
+ nonstd::unique_ptr<CXML_Element> m_pXmlElement;
};
+
class CPDF_ViewerPreferences {
public:
CPDF_ViewerPreferences(CPDF_Document* pDoc);