Chromium Code Reviews| Index: core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h |
| diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h |
| index 784d49714f5dee024cc966bb6996956354235b17..5545ebc155d6018ee48e59390bd8ada596b5a399 100644 |
| --- a/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h |
| +++ b/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h |
| @@ -11,6 +11,7 @@ |
| #include <set> |
| #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" |
| +#include "core/fxcrt/include/cfx_string_pool_template.h" |
| #include "core/fxcrt/include/fx_coordinates.h" |
| #include "core/fxcrt/include/fx_string.h" |
| @@ -22,6 +23,7 @@ class CPDF_Dictionary : public CPDF_Object { |
| using const_iterator = std::map<CFX_ByteString, CPDF_Object*>::const_iterator; |
| CPDF_Dictionary(); |
| + CPDF_Dictionary(CFX_ByteStringPool* pPool); |
|
Tom Sepez
2016/09/16 19:58:39
note: The question is whether it is better for the
dsinclair
2016/09/19 13:24:34
I think the dictionary should track the pool, unle
|
| // CPDF_Object. |
| Type GetType() const override; |
| @@ -83,13 +85,17 @@ class CPDF_Dictionary : public CPDF_Object { |
| const_iterator begin() const { return m_Map.begin(); } |
| const_iterator end() const { return m_Map.end(); } |
| + CFX_ByteStringPool* GetByteStringPool() const { return m_pPool; } |
| + |
| protected: |
| ~CPDF_Dictionary() override; |
| + CFX_ByteString MaybeIntern(const CFX_ByteString& str); |
| CPDF_Object* CloneNonCyclic( |
| bool bDirect, |
| std::set<const CPDF_Object*>* visited) const override; |
| + CFX_ByteStringPool* const m_pPool; |
| std::map<CFX_ByteString, CPDF_Object*> m_Map; |
| }; |