Index: base/platform_file.h |
diff --git a/base/platform_file.h b/base/platform_file.h |
index 43758c51cee035771fe267ff8b7b57cd773cd828..6a6b9434fe58980624f1f2b39f7b1f9a896503e5 100644 |
--- a/base/platform_file.h |
+++ b/base/platform_file.h |
@@ -19,14 +19,6 @@ |
namespace base { |
-#if defined(OS_WIN) |
-typedef HANDLE PlatformFile; |
-const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE; |
-#elif defined(OS_POSIX) |
-typedef int PlatformFile; |
-const PlatformFile kInvalidPlatformFileValue = -1; |
-#endif |
- |
// PLATFORM_FILE_(OPEN|CREATE).* are mutually exclusive. You should specify |
// exactly one of the five (possibly combining with other flags) when opening |
// or creating a file. |
@@ -119,6 +111,16 @@ struct BASE_EXPORT PlatformFileInfo { |
base::Time creation_time; |
}; |
+#if defined(OS_WIN) |
+typedef HANDLE PlatformFile; |
+const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE; |
+PlatformFileError LastErrorToPlatformFileError(DWORD saved_errno); |
+#elif defined(OS_POSIX) |
+typedef int PlatformFile; |
+const PlatformFile kInvalidPlatformFileValue = -1; |
+PlatformFileError ErrnoToPlatformFileError(int saved_errno); |
+#endif |
+ |
// Creates or opens the given file. If |created| is provided, it will be set to |
// true if a new file was created [or an old one truncated to zero length to |
// simulate a new file, which can happen with PLATFORM_FILE_CREATE_ALWAYS], and |