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

Unified Diff: util/file/file_io.h

Issue 871193010: Add FileHandleFileWriter (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Rename to WeakFileHandleFileWriter Created 5 years, 10 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 | « no previous file | util/file/file_writer.h » ('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 ef22e2d7637b558f38c492cd36db990d421c2db1..268bfd3b026ca4c000933f62d2ab88c269b26ae6 100644
--- a/util/file/file_io.h
+++ b/util/file/file_io.h
@@ -43,12 +43,17 @@ using FileOffset = off_t;
//! \brief Scoped wrapper of a FileHandle.
using ScopedFileHandle = base::ScopedFD;
+//! \brief A value that can never be a valid FileHandle.
+const FileHandle kInvalidFileHandle = -1;
+
#elif defined(OS_WIN)
using FileHandle = HANDLE;
using FileOffset = LONGLONG;
using ScopedFileHandle = ScopedFileHANDLE;
+const FileHandle kInvalidFileHandle = INVALID_HANDLE_VALUE;
+
#endif
//! \brief Determines the mode that LoggingOpenFileForWrite() uses.
« no previous file with comments | « no previous file | util/file/file_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698