Index: util/file/file_io.h |
diff --git a/util/file/file_io.h b/util/file/file_io.h |
index 2c59f598883e70cf1825067d40e515b63487bb34..7461a16099034997a7666c3d72a12800048e14fd 100644 |
--- a/util/file/file_io.h |
+++ b/util/file/file_io.h |
@@ -19,8 +19,11 @@ |
#include "build/build_config.h" |
-#if defined(OS_WIN) |
+#if defined(OS_POSIX) |
+#include "base/files/scoped_file.h" |
+#elif defined(OS_WIN) |
#include <windows.h> |
+#include "util/win/scoped_handle.h" |
#endif |
namespace base { |
@@ -37,10 +40,14 @@ using FileHandle = int; |
//! \brief Platform-specific alias for a position in an open file. |
using FileOffset = off_t; |
+//! \brief Scoped wrapper of a FileHandle. |
+using ScopedFileHandle = base::ScopedFD; |
Mark Mentovai
2014/12/19 20:42:57
Good thing this name is available. :)
scottmg
2014/12/19 21:32:41
You can see the future! :)
|
+ |
#elif defined(OS_WIN) |
using FileHandle = HANDLE; |
using FileOffset = LONGLONG; |
+using ScopedFileHandle = ScopedFileHANDLE; |
#endif |