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: base/platform_file.h

Issue 3165050: Change the FileUtilProxy callbacks to report error codes instead of booleans.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
Index: base/platform_file.h
===================================================================
--- base/platform_file.h (revision 56938)
+++ base/platform_file.h (working copy)
@@ -37,9 +37,17 @@
PLATFORM_FILE_ASYNC = 256,
PLATFORM_FILE_TEMPORARY = 512, // Used on Windows only
PLATFORM_FILE_HIDDEN = 1024, // Used on Windows only
- PLATFORM_FILE_DELETE_ON_CLOSE = 2048
+ PLATFORM_FILE_DELETE_ON_CLOSE = 2048,
+ PLATFORM_FILE_TRUNCATE = 4096 // Used on Windows only
darin (slow to review) 2010/08/24 17:43:14 don't we need to support truncation on other platf
dumi 2010/08/24 19:14:57 this belongs to a different CL. removed.
};
+// TODO(dumi): add more specific error codes for CreatePlatformFile().
+// TODO(dumi): add more error codes as we add new methods to FileUtilProxy.
+enum PlatformFileErrors {
+ PLATFORM_FILE_OK = 0,
+ PLATFORM_FILE_ERROR = -1
+};
+
// Creates or opens the given file. If PLATFORM_FILE_OPEN_ALWAYS is used, and
// |created| is provided, |created| will be set to true if the file was created
// or to false in case the file was just opened.

Powered by Google App Engine
This is Rietveld 408576698