Add File::Duplicate to duplicate a file handle.

BUG=462584
R=rvargas@chromium.org

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

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


CrOS-Libchrome-Original-Commit: bad5603dd8bbcf7583e8e483f8198e9b88f1c079
diff --git a/base/files/file.h b/base/files/file.h
index db04871..13c8a96 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -288,6 +288,13 @@
   // Unlock a file previously locked.
   Error Unlock();
 
+  // Returns a new object referencing this file for use within the current
+  // process. Handling of FLAG_DELETE_ON_CLOSE varies by OS. On POSIX, the File
+  // object that was created or initialized with this flag will have unlinked
+  // the underlying file when it was created or opened. On Windows, the
+  // underlying file is deleted when the last handle to it is closed.
+  File Duplicate();
+
   bool async() const { return async_; }
 
 #if defined(OS_WIN)