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

Unified Diff: base/files/file_util_posix.cc

Issue 693493004: Revert of Allow POSIX callers to specify a new file's mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « base/files/file_util.h ('k') | base/files/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_posix.cc
diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc
index 1494c6a5f26d86a92ba76ffe8d988f4365459745..d86d9bcc7e94f2067b35ae74855d55a4d1bee290 100644
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -693,15 +693,6 @@
if (IGNORE_EINTR(close(fd)) < 0)
return -1;
return bytes_written;
-}
-
-bool WriteFileWithMode(const FilePath& filename, const char* data, int size,
- mode_t mode) {
- ThreadRestrictions::AssertIOAllowed();
- ScopedFD file(HANDLE_EINTR(creat(filename.value().c_str(), mode)));
- if (!file.is_valid())
- return false;
- return WriteFileDescriptor(file.get(), data, size);
}
bool WriteFileDescriptor(const int fd, const char* data, int size) {
« no previous file with comments | « base/files/file_util.h ('k') | base/files/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698