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

Unified Diff: base/files/file.h

Issue 1216183004: Only set File::[tracing_]path_ when file tracing is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tracing_path_ Created 5 years, 6 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.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 94ef56fbbc8fae9be21f93a38dbad1e49a06de20..b592c79cc13f2d3442f89fceaadd79d21c45d796 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -357,7 +357,7 @@ class BASE_EXPORT File {
// Creates or opens the given file. Only called if |path_| has no
// traversal ('..') components.
- void DoInitialize(uint32 flags);
+ void DoInitialize(uint32 flags, const FilePath& path);
rvargas (doing something else) 2015/07/02 02:11:05 tiny nit: Do you mind going back to having path as
Dan Beam 2015/07/02 02:18:06 Done.
// TODO(tnagel): Reintegrate into Flush() once histogram isn't needed anymore,
// cf. issue 473337.
@@ -371,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_;
+ // Path that |Initialize()| was called with. Only set if safe (i.e. no '..')
rvargas (doing something else) 2015/07/02 02:11:06 I think the safe reference is stale at this point,
Dan Beam 2015/07/02 02:18:06 Done.
+ // and if file tracing is enabled when |Initialize()| is called.
+ FilePath tracing_path_;
// Object tied to the lifetime of |this| that enables/disables tracing.
FileTracing::ScopedEnabler trace_enabler_;
« no previous file with comments | « no previous file | base/files/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698