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

Unified Diff: util/file/file_io.h

Issue 815053004: Switch [String]FileWriter to use new file_io.h functions/types (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@file_io_seek-2
Patch Set: win Created 6 years 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
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
« no previous file with comments | « tools/generate_dump.cc ('k') | util/file/file_writer.h » ('j') | util/file/file_writer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698