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

Unified Diff: xfa/fgas/crt/fgas_stream.h

Issue 2559763002: Refcount IFGAS_ streams all the time, too (Closed)
Patch Set: more 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 | « xfa/fde/xml/fde_xml_imp_unittest.cpp ('k') | xfa/fgas/crt/fgas_stream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/crt/fgas_stream.h
diff --git a/xfa/fgas/crt/fgas_stream.h b/xfa/fgas/crt/fgas_stream.h
index b6552d98255ba95cc1aac3fbba4ffedfdeaa45a5..79fda58d2a5db28b8a7705f8e3cd6d1fbf35f038 100644
--- a/xfa/fgas/crt/fgas_stream.h
+++ b/xfa/fgas/crt/fgas_stream.h
@@ -27,27 +27,23 @@ enum FX_STREAMSEEK {
FX_STREAMSEEK_End,
};
-class IFGAS_Stream {
+class IFGAS_Stream : public CFX_Retainable {
public:
- static IFGAS_Stream* CreateStream(
+ static CFX_RetainPtr<IFGAS_Stream> CreateStream(
const CFX_RetainPtr<IFX_SeekableReadStream>& pFileRead,
uint32_t dwAccess);
- static IFGAS_Stream* CreateStream(
+ static CFX_RetainPtr<IFGAS_Stream> CreateStream(
const CFX_RetainPtr<IFX_SeekableWriteStream>& pFileWrite,
uint32_t dwAccess);
- static IFGAS_Stream* CreateStream(uint8_t* pData,
- int32_t length,
- uint32_t dwAccess);
- static IFGAS_Stream* CreateTextStream(IFGAS_Stream* pBaseStream,
- bool bDeleteOnRelease);
+ static CFX_RetainPtr<IFGAS_Stream> CreateStream(uint8_t* pData,
+ int32_t length,
+ uint32_t dwAccess);
+ static CFX_RetainPtr<IFGAS_Stream> CreateTextStream(
+ const CFX_RetainPtr<IFGAS_Stream>& pBaseStream);
- virtual ~IFGAS_Stream() {}
- virtual void Release() = 0;
- virtual IFGAS_Stream* Retain() = 0;
-
- virtual IFGAS_Stream* CreateSharedStream(uint32_t dwAccess,
- int32_t iOffset,
- int32_t iLength) = 0;
+ virtual CFX_RetainPtr<IFGAS_Stream> CreateSharedStream(uint32_t dwAccess,
+ int32_t iOffset,
+ int32_t iLength) = 0;
virtual uint32_t GetAccessModes() const = 0;
virtual int32_t GetLength() const = 0;
« no previous file with comments | « xfa/fde/xml/fde_xml_imp_unittest.cpp ('k') | xfa/fgas/crt/fgas_stream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698