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

Unified Diff: base/platform_file_win.cc

Issue 15861011: Add an "append flag" to base::PlatformFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary braces Created 7 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
« base/platform_file_posix.cc ('K') | « base/platform_file_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file_win.cc
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index cdc06bd1ca2bd192f150d89316d24f5348c5eb05..98721705fe3a1b4ca5f9e096dbee14f556a16a27 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -58,6 +58,11 @@ PlatformFile CreatePlatformFileUnsafe(const FilePath& name,
access |= FILE_WRITE_ATTRIBUTES;
if (flags & PLATFORM_FILE_EXECUTE)
access |= GENERIC_EXECUTE;
+ if (flags & PLATFORM_FILE_APPEND) {
+ access |= FILE_APPEND_DATA;
+ if (flags & PLATFORM_FILE_WRITE) // Invalid.
+ return NULL;
+ }
DWORD sharing = (flags & PLATFORM_FILE_EXCLUSIVE_READ) ? 0 : FILE_SHARE_READ;
if (!(flags & PLATFORM_FILE_EXCLUSIVE_WRITE))
« base/platform_file_posix.cc ('K') | « base/platform_file_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698