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

Unified Diff: base/platform_file.h

Issue 10392181: Implement serial API for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix weird Windows build error. Created 8 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') | chrome/browser/extensions/api/api_resource_controller.h » ('J')
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 2bfd181a16c7c0f960356710d735c2c70c4a764f..0506bc3b8f6a4a46aeba90b8d5b0270eb37bc6fa 100644
--- a/base/platform_file.h
+++ b/base/platform_file.h
@@ -32,26 +32,29 @@ const PlatformFile kInvalidPlatformFileValue = -1;
// exactly one of the five (possibly combining with other flags) when opening
// or creating a file.
enum PlatformFileFlags {
- 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
-
- PLATFORM_FILE_SHARE_DELETE = 32768, // Used on Windows only
+ PLATFORM_FILE_OPEN = 1 << 0, // Opens a file, only if it exists.
+ PLATFORM_FILE_CREATE = 1 << 1, // Creates a new file, only if it
+ // does not already exist.
+ PLATFORM_FILE_OPEN_ALWAYS = 1 << 2, // May create a new file.
+ PLATFORM_FILE_CREATE_ALWAYS = 1 << 3, // May overwrite an old file.
+ PLATFORM_FILE_OPEN_TRUNCATED = 1 << 4, // Opens a file and truncates it,
+ // only if it exists.
+ PLATFORM_FILE_READ = 1 << 5,
+ PLATFORM_FILE_WRITE = 1 << 6,
+ PLATFORM_FILE_EXCLUSIVE_READ = 1 << 7, // EXCLUSIVE is opposite of Windows
+ // SHARE
+ PLATFORM_FILE_EXCLUSIVE_WRITE = 1 << 8,
+ PLATFORM_FILE_ASYNC = 1 << 9,
+ PLATFORM_FILE_TEMPORARY = 1 << 10, // Used on Windows only
+ PLATFORM_FILE_HIDDEN = 1 << 11, // Used on Windows only
+ PLATFORM_FILE_DELETE_ON_CLOSE = 1 << 12,
+
+ PLATFORM_FILE_WRITE_ATTRIBUTES = 1 << 13, // Used on Windows only
+ PLATFORM_FILE_ENUMERATE = 1 << 14, // May enumerate directory
+
+ PLATFORM_FILE_SHARE_DELETE = 1 << 15, // Used on Windows only
+
+ PLATFORM_FILE_TERMINAL_DEVICE = 1 << 16, // Serial port flags
};
// PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of
« no previous file with comments | « no previous file | base/platform_file_posix.cc » ('j') | chrome/browser/extensions/api/api_resource_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698