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

Unified Diff: util/file/file_io_posix.cc

Issue 821483002: Change 'bool world_readable' to an enum (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 6 years 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.h ('k') | util/file/file_io_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_io_posix.cc
diff --git a/util/file/file_io_posix.cc b/util/file/file_io_posix.cc
index fbfdad0837368d776b51b55a8372a3400fb166d9..60bc9a8daaac1473a1f49c01f76433c77cc7b7e7 100644
--- a/util/file/file_io_posix.cc
+++ b/util/file/file_io_posix.cc
@@ -84,7 +84,7 @@ FileHandle LoggingOpenFileForRead(const base::FilePath& path) {
FileHandle LoggingOpenFileForWrite(const base::FilePath& path,
FileWriteMode mode,
- bool world_readable) {
+ FilePermissions permissions) {
int flags = O_WRONLY | O_CREAT;
// kReuseOrCreate does not need any additional flags.
if (mode == FileWriteMode::kTruncateOrCreate)
@@ -93,7 +93,9 @@ FileHandle LoggingOpenFileForWrite(const base::FilePath& path,
flags |= O_EXCL;
int fd = HANDLE_EINTR(
- open(path.value().c_str(), flags, world_readable ? 0644 : 0600));
+ open(path.value().c_str(),
+ flags,
+ permissions == FilePermissions::kWorldReadable ? 0644 : 0600));
PLOG_IF(ERROR, fd < 0) << "open " << path.value();
return fd;
}
« no previous file with comments | « util/file/file_io.h ('k') | util/file/file_io_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698