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

Unified Diff: util/file/file_io_win.cc

Issue 1390023002: Add FileWriteMode::kCreateOrFail (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Test that kReuseOrCreate can create Created 5 years, 2 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 | « util/file/file_io_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_io_win.cc
diff --git a/util/file/file_io_win.cc b/util/file/file_io_win.cc
index 24a875011a8a5f200914d24054872e620d47bb58..dce1518aba89b1f0bdc617fe0a5569a99455b6a6 100644
--- a/util/file/file_io_win.cc
+++ b/util/file/file_io_win.cc
@@ -43,6 +43,9 @@ FileHandle LoggingOpenFileForOutput(DWORD access,
FilePermissions permissions) {
DWORD disposition = 0;
switch (mode) {
+ case FileWriteMode::kReuseOrFail:
+ disposition = OPEN_EXISTING;
+ break;
case FileWriteMode::kReuseOrCreate:
disposition = OPEN_ALWAYS;
break;
« no previous file with comments | « util/file/file_io_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698