summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_stream.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-21 13:19:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-21 13:19:10 -0800
commit9e05ee1e7bfb74d56d69620ad1e72b03e29b9237 (patch)
tree12b47b617d99edc7bd2715292402b74e864e1fa4 /core/fpdfapi/parser/cpdf_stream.h
parentaa3922dd713d480229408f3a0813b7dab9e8fd78 (diff)
downloadpdfium-9e05ee1e7bfb74d56d69620ad1e72b03e29b9237.tar.xz
Make CPDF_Stream() take unique_ptr's to its dictionary.
Review-Url: https://codereview.chromium.org/2520493002
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.h')
-rw-r--r--core/fpdfapi/parser/cpdf_stream.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index c4f9aacf2b..fb2b67cd82 100644
--- a/core/fpdfapi/parser/cpdf_stream.h
+++ b/core/fpdfapi/parser/cpdf_stream.h
@@ -18,8 +18,11 @@ class CPDF_Stream : public CPDF_Object {
public:
CPDF_Stream();
- // Takes ownership of |pData| and |pDict|.
- CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict);
+ // Takes ownership of |pData|.
+ CPDF_Stream(uint8_t* pData,
+ uint32_t size,
+ std::unique_ptr<CPDF_Dictionary> pDict);
+
~CPDF_Stream() override;
// CPDF_Object:
@@ -37,9 +40,11 @@ class CPDF_Stream : public CPDF_Object {
// Does not takes onwership of |pData|, copies into internally-owned buffer.
void SetData(const uint8_t* pData, uint32_t size);
- void InitStream(const uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict);
+ void InitStream(const uint8_t* pData,
+ uint32_t size,
+ std::unique_ptr<CPDF_Dictionary> pDict);
void InitStreamFromFile(IFX_SeekableReadStream* pFile,
- CPDF_Dictionary* pDict);
+ std::unique_ptr<CPDF_Dictionary> pDict);
bool ReadRawData(FX_FILESIZE start_pos,
uint8_t* pBuf,