summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_extension.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-24 10:19:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-24 10:19:11 -0700
commitad2441ef675866eb84c7392eeda03391a5a5d474 (patch)
tree5b250139c65d5f440f3b544643b1fb85e23380dd /core/fxcrt/fx_extension.cpp
parentb674ebe6dd13288160ad8e324d719a124caf5a83 (diff)
downloadpdfium-ad2441ef675866eb84c7392eeda03391a5a5d474.tar.xz
Rename IFX_ stream nameschromium/2900
It's been troubling for some time that an IFX_FileStream might actually be an in-memory buffer with no backing file. Review-Url: https://codereview.chromium.org/2443723002
Diffstat (limited to 'core/fxcrt/fx_extension.cpp')
-rw-r--r--core/fxcrt/fx_extension.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
index ca6b6d4066..5ac22bd44e 100644
--- a/core/fxcrt/fx_extension.cpp
+++ b/core/fxcrt/fx_extension.cpp
@@ -36,7 +36,7 @@ void CFX_CRTFileAccess::GetPath(CFX_WideString& wsPath) {
wsPath = m_path;
}
-IFX_FileStream* CFX_CRTFileAccess::CreateFileStream(uint32_t dwModes) {
+IFX_SeekableStream* CFX_CRTFileAccess::CreateFileStream(uint32_t dwModes) {
return FX_CreateFileStream(m_path.c_str(), dwModes);
}
@@ -85,7 +85,7 @@ CFX_MemoryStream::~CFX_MemoryStream() {
m_Blocks.RemoveAll();
}
-IFX_FileStream* CFX_MemoryStream::Retain() {
+IFX_SeekableStream* CFX_MemoryStream::Retain() {
m_dwCount++;
return this;
}
@@ -281,7 +281,7 @@ FX_BOOL CFX_MemoryStream::ExpandBlocks(size_t size) {
return TRUE;
}
-IFX_FileStream* CFX_CRTFileStream::Retain() {
+IFX_SeekableStream* CFX_CRTFileStream::Retain() {
m_dwCount++;
return this;
}
@@ -336,24 +336,25 @@ IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath) {
}
#endif // PDF_ENABLE_XFA
-IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, uint32_t dwModes) {
+IFX_SeekableStream* FX_CreateFileStream(const FX_CHAR* filename,
+ uint32_t dwModes) {
std::unique_ptr<IFXCRT_FileAccess> pFA(IFXCRT_FileAccess::Create());
if (!pFA->Open(filename, dwModes))
return nullptr;
return new CFX_CRTFileStream(std::move(pFA));
}
-IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename,
- uint32_t dwModes) {
+IFX_SeekableStream* FX_CreateFileStream(const FX_WCHAR* filename,
+ uint32_t dwModes) {
std::unique_ptr<IFXCRT_FileAccess> pFA(IFXCRT_FileAccess::Create());
if (!pFA->Open(filename, dwModes))
return nullptr;
return new CFX_CRTFileStream(std::move(pFA));
}
-IFX_FileRead* FX_CreateFileRead(const FX_CHAR* filename) {
+IFX_SeekableReadStream* FX_CreateFileRead(const FX_CHAR* filename) {
return FX_CreateFileStream(filename, FX_FILEMODE_ReadOnly);
}
-IFX_FileRead* FX_CreateFileRead(const FX_WCHAR* filename) {
+IFX_SeekableReadStream* FX_CreateFileRead(const FX_WCHAR* filename) {
return FX_CreateFileStream(filename, FX_FILEMODE_ReadOnly);
}
IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer,