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

Unified Diff: base/files/file.h

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/file_version_info_unittest.cc ('k') | base/files/file.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 b21b15972bce7c62be0dad659cff4e76af262ac2..cba435363560187f60341cad8c865ed1d576b291 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -176,6 +176,9 @@ class BASE_EXPORT File {
~File();
+ // Takes ownership of |platform_file|.
+ static File CreateForAsyncHandle(PlatformFile platform_file);
+
// Move operator= for C++03 move emulation of this type.
File& operator=(RValue other);
@@ -352,9 +355,9 @@ class BASE_EXPORT File {
};
#endif
- // Creates or opens the given file. Only called if |path_| has no
+ // Creates or opens the given file. Only called if |path| has no
// traversal ('..') components.
- void DoInitialize(uint32 flags);
+ void DoInitialize(const FilePath& path, uint32 flags);
// TODO(tnagel): Reintegrate into Flush() once histogram isn't needed anymore,
// cf. issue 473337.
@@ -368,8 +371,9 @@ class BASE_EXPORT File {
MemoryCheckingScopedFD file_;
#endif
- // Path that |Initialize()| was called with. Only set if safe (i.e. no '..').
- FilePath path_;
+ // A path to use for tracing purposes. Set if file tracing is enabled during
+ // |Initialize()|.
+ FilePath tracing_path_;
// Object tied to the lifetime of |this| that enables/disables tracing.
FileTracing::ScopedEnabler trace_enabler_;
« no previous file with comments | « base/file_version_info_unittest.cc ('k') | base/files/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698