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

Unified Diff: base/platform_file.h

Issue 7038032: Fix PP_FileOpenFlags_Dev handling: (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 9 years, 7 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 | base/platform_file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file.h
diff --git a/base/platform_file.h b/base/platform_file.h
index dbac61a202498968a47bd15cb711432b5d79aa5c..5b29e07fa08084360710ed84d6ada7908cb764d2 100644
--- a/base/platform_file.h
+++ b/base/platform_file.h
@@ -28,20 +28,26 @@ 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.
enum PlatformFileFlags {
- PLATFORM_FILE_OPEN = 1,
- PLATFORM_FILE_CREATE = 2,
- PLATFORM_FILE_OPEN_ALWAYS = 4, // May create a new file.
- PLATFORM_FILE_CREATE_ALWAYS = 8, // May overwrite an old file.
- PLATFORM_FILE_READ = 16,
- PLATFORM_FILE_WRITE = 32,
- PLATFORM_FILE_EXCLUSIVE_READ = 64, // EXCLUSIVE is opposite of Windows SHARE
- PLATFORM_FILE_EXCLUSIVE_WRITE = 128,
- 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_TRUNCATE = 4096,
+ PLATFORM_FILE_OPEN = 1, // Opens a file, only if it exists.
+ PLATFORM_FILE_CREATE = 2, // Creates a new file, only if it does not
+ // already exist.
+ PLATFORM_FILE_OPEN_ALWAYS = 4, // May create a new file.
+ PLATFORM_FILE_CREATE_ALWAYS = 8, // May overwrite an old file.
+ PLATFORM_FILE_OPEN_TRUNCATED = 16, // Opens a file and truncates it, only if
+ // it exists.
+ PLATFORM_FILE_READ = 32,
+ PLATFORM_FILE_WRITE = 64,
+ PLATFORM_FILE_EXCLUSIVE_READ = 128, // EXCLUSIVE is opposite of Windows SHARE
+ PLATFORM_FILE_EXCLUSIVE_WRITE = 256,
+ PLATFORM_FILE_ASYNC = 512,
+ PLATFORM_FILE_TEMPORARY = 1024, // Used on Windows only
+ PLATFORM_FILE_HIDDEN = 2048, // Used on Windows only
+ PLATFORM_FILE_DELETE_ON_CLOSE = 4096,
+
PLATFORM_FILE_WRITE_ATTRIBUTES = 8192, // Used on Windows only
PLATFORM_FILE_ENUMERATE = 16384, // May enumerate directory
};
« no previous file with comments | « no previous file | base/platform_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698