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

Unified Diff: util/file/file_io.h

Issue 1419673007: Remove usage of compat from client (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 2 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 | « client/client_test.gyp ('k') | util/file/file_io_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_io.h
diff --git a/util/file/file_io.h b/util/file/file_io.h
index ec89d62b556afd35ae97b6318eb5c98d907d84ad..55909415fefe6d7b45a7e5f0fdb743b2d60041c7 100644
--- a/util/file/file_io.h
+++ b/util/file/file_io.h
@@ -67,11 +67,14 @@ using ScopedFileHandle = base::ScopedFD;
//! \brief A value that can never be a valid FileHandle.
const FileHandle kInvalidFileHandle = -1;
+using FileOperationResult = ssize_t;
+
#elif defined(OS_WIN)
using FileHandle = HANDLE;
using FileOffset = LONGLONG;
using ScopedFileHandle = ScopedFileHANDLE;
+using FileOperationResult = LONG_PTR;
const FileHandle kInvalidFileHandle = INVALID_HANDLE_VALUE;
@@ -126,7 +129,7 @@ enum class FileLocking : bool {
//! \sa LoggingReadFile
//! \sa CheckedReadFile
//! \sa CheckedReadFileAtEOF
-ssize_t ReadFile(FileHandle file, void* buffer, size_t size);
+FileOperationResult ReadFile(FileHandle file, void* buffer, size_t size);
//! \brief Writes to a file, retrying when interrupted or following a short
//! write on POSIX.
@@ -141,7 +144,7 @@ ssize_t ReadFile(FileHandle file, void* buffer, size_t size);
//! \sa ReadFile
//! \sa LoggingWriteFile
//! \sa CheckedWriteFile
-ssize_t WriteFile(FileHandle file, const void* buffer, size_t size);
+FileOperationResult WriteFile(FileHandle file, const void* buffer, size_t size);
//! \brief Wraps ReadFile(), ensuring that exactly \a size bytes are read.
//!
« no previous file with comments | « client/client_test.gyp ('k') | util/file/file_io_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698