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

Unified Diff: base/files/file.h

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 | « base/base.gypi ('k') | base/files/file_posix.cc » ('j') | no next file with comments »
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..13c8a96fcefe29ad89112946e705ae86e07790bd 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -128,9 +128,9 @@ class BASE_EXPORT File {
// Used to hold information about a given file.
// If you add more fields to this structure (platform-specific fields are OK),
- // make sure to update all functions that use it in file_util_{win|posix}.cc
- // too, and the ParamTraits<base::PlatformFileInfo> implementation in
- // chrome/common/common_param_traits.cc.
+ // make sure to update all functions that use it in file_util_{win|posix}.cc,
+ // too, and the ParamTraits<base::File::Info> implementation in
+ // ipc/ipc_message_utils.cc.
struct BASE_EXPORT Info {
Info();
~Info();
@@ -145,7 +145,8 @@ class BASE_EXPORT File {
// True if the file corresponds to a directory.
bool is_directory;
- // True if the file corresponds to a symbolic link.
+ // True if the file corresponds to a symbolic link. For Windows currently
+ // not supported and thus always false.
bool is_symbolic_link;
// The last modified time of a file.
@@ -287,6 +288,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 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)
« no previous file with comments | « base/base.gypi ('k') | base/files/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698