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

Unified Diff: base/files/file_posix.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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_path.cc ('k') | base/files/file_tracing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_posix.cc
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index bb49d2dd730eb4ee587e968a601942ab8afc6045..7fb617c3f9daab5cc0494cb63e54ddc7a3eb1a65 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -466,7 +466,7 @@ void File::MemoryCheckingScopedFD::UpdateChecksum() {
// NaCl doesn't implement system calls to open files directly.
#if !defined(OS_NACL)
// TODO(erikkay): does it make sense to support FLAG_EXCLUSIVE_* here?
-void File::DoInitialize(uint32 flags) {
+void File::DoInitialize(const FilePath& path, uint32 flags) {
ThreadRestrictions::AssertIOAllowed();
DCHECK(!IsValid());
@@ -521,7 +521,7 @@ void File::DoInitialize(uint32 flags) {
mode |= S_IRGRP | S_IROTH;
#endif
- int descriptor = HANDLE_EINTR(open(path_.value().c_str(), open_flags, mode));
+ int descriptor = HANDLE_EINTR(open(path.value().c_str(), open_flags, mode));
if (flags & FLAG_OPEN_ALWAYS) {
if (descriptor < 0) {
@@ -529,7 +529,7 @@ void File::DoInitialize(uint32 flags) {
if (flags & FLAG_EXCLUSIVE_READ || flags & FLAG_EXCLUSIVE_WRITE)
open_flags |= O_EXCL; // together with O_CREAT implies O_NOFOLLOW
- descriptor = HANDLE_EINTR(open(path_.value().c_str(), open_flags, mode));
+ descriptor = HANDLE_EINTR(open(path.value().c_str(), open_flags, mode));
if (descriptor >= 0)
created_ = true;
}
@@ -544,7 +544,7 @@ void File::DoInitialize(uint32 flags) {
created_ = true;
if (flags & FLAG_DELETE_ON_CLOSE)
- unlink(path_.value().c_str());
+ unlink(path.value().c_str());
async_ = ((flags & FLAG_ASYNC) == FLAG_ASYNC);
error_details_ = FILE_OK;
« no previous file with comments | « base/files/file_path.cc ('k') | base/files/file_tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698