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

Unified Diff: core/fxcrt/fxcrt_posix.cpp

Issue 1994323002: Remove Release() from IFXCRT_FileAccess (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: include <utility>. Created 4 years, 7 months 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/fxcrt/fxcrt_posix.h ('k') | core/fxcrt/fxcrt_windows.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fxcrt_posix.cpp
diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp
index 9237acef6bf50d04d6d0a6451dd73a04da8f2aae..053f89c2c9192de0f075953edf420dc391b3c6a9 100644
--- a/core/fxcrt/fxcrt_posix.cpp
+++ b/core/fxcrt/fxcrt_posix.cpp
@@ -11,9 +11,12 @@
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \
_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
_FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
-IFXCRT_FileAccess* FXCRT_FileAccess_Create() {
+
+// static
+IFXCRT_FileAccess* IFXCRT_FileAccess::Create() {
return new CFXCRT_FileAccess_Posix;
}
+
void FXCRT_Posix_GetFileMode(uint32_t dwModes,
int32_t& nFlags,
int32_t& nMasks) {
@@ -54,9 +57,6 @@ void CFXCRT_FileAccess_Posix::Close() {
close(m_nFD);
m_nFD = -1;
}
-void CFXCRT_FileAccess_Posix::Release() {
- delete this;
-}
FX_FILESIZE CFXCRT_FileAccess_Posix::GetSize() const {
if (m_nFD < 0) {
return 0;
@@ -127,4 +127,5 @@ FX_BOOL CFXCRT_FileAccess_Posix::Truncate(FX_FILESIZE szFile) {
}
return !ftruncate(m_nFD, szFile);
}
+
#endif
« no previous file with comments | « core/fxcrt/fxcrt_posix.h ('k') | core/fxcrt/fxcrt_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698