Only set File::[tracing_]path_ when file tracing is enabled.

R=rvargas@chromium.org
BUG=none
TEST=less |path_| cruft lying around

Review URL: https://codereview.chromium.org/1216183004

Cr-Commit-Position: refs/heads/master@{#337168}


CrOS-Libchrome-Original-Commit: fd5b108c82d56f6022dfbe62a023d1e81ff6f83b
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index bb49d2d..7fb617c 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -466,7 +466,7 @@
 // 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 @@
   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 @@
       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 @@
     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;