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

Unified Diff: base/files/file_tracing.h

Issue 2163063002: Make File::Duplicate() const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unneeded 'private:' label Created 4 years, 5 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/files/file_posix.cc ('k') | base/files/file_tracing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_tracing.h
diff --git a/base/files/file_tracing.h b/base/files/file_tracing.h
index bedd7be64b28d7c5c8bfa39fa197749bd0140985..1fbfcd44988fa5093123d39c9b163d658ccf591c 100644
--- a/base/files/file_tracing.h
+++ b/base/files/file_tracing.h
@@ -37,21 +37,21 @@ class BASE_EXPORT FileTracing {
virtual bool FileTracingCategoryIsEnabled() const = 0;
// Enables file tracing for |id|. Must be called before recording events.
- virtual void FileTracingEnable(void* id) = 0;
+ virtual void FileTracingEnable(const void* id) = 0;
// Disables file tracing for |id|.
- virtual void FileTracingDisable(void* id) = 0;
+ virtual void FileTracingDisable(const void* id) = 0;
// Begins an event for |id| with |name|. |path| tells where in the directory
// structure the event is happening (and may be blank). |size| is the number
// of bytes involved in the event.
virtual void FileTracingEventBegin(const char* name,
- void* id,
+ const void* id,
const FilePath& path,
int64_t size) = 0;
// Ends an event for |id| with |name|.
- virtual void FileTracingEventEnd(const char* name, void* id) = 0;
+ virtual void FileTracingEventEnd(const char* name, const void* id) = 0;
};
// Sets a global file tracing provider to query categories and record events.
@@ -73,12 +73,12 @@ class BASE_EXPORT FileTracing {
// event to trace (e.g. "Read", "Write") and must have an application
// lifetime (e.g. static or literal). |file| is the file being traced; must
// outlive this class. |size| is the size (in bytes) of this event.
- void Initialize(const char* name, File* file, int64_t size);
+ void Initialize(const char* name, const File* file, int64_t size);
private:
// The ID of this trace. Based on the |file| passed to |Initialize()|. Must
// outlive this class.
- void* id_;
+ const void* id_;
// The name of the event to trace (e.g. "Read", "Write"). Prefixed with
// "File".
« no previous file with comments | « base/files/file_posix.cc ('k') | base/files/file_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698