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

Unified Diff: base/files/file.h

Issue 1017243002: Add File::Duplicate to duplicate a file handle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rvargas feedback Created 5 years, 9 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 | « no previous file | base/files/file_posix.cc » ('j') | base/files/file_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file.h
diff --git a/base/files/file.h b/base/files/file.h
index 7b6366c1c2edaa2c6ccb695f2f075ff83f0d002b..51f90a96236fa01e6aa9656db7e847a8b0c90e0c 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -287,6 +287,13 @@ class BASE_EXPORT File {
// 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 unlink the
+ // underlying file on close. 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)
« no previous file with comments | « no previous file | base/files/file_posix.cc » ('j') | base/files/file_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698