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

Unified Diff: core/fpdfapi/parser/cpdf_stream.h

Issue 2520493002: Make CPDF_Stream() take unique_ptr's to its dictionary. (Closed)
Patch Set: rebase, lint, fix new test. Created 4 years, 1 month 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 | « core/fpdfapi/parser/cpdf_object_unittest.cpp ('k') | core/fpdfapi/parser/cpdf_stream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_stream.h
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index c4f9aacf2b48afbee0e85e2c57e62d3306f62790..fb2b67cd82015cd8956939cd0816bd84c78e1d68 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,
« no previous file with comments | « core/fpdfapi/parser/cpdf_object_unittest.cpp ('k') | core/fpdfapi/parser/cpdf_stream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698