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

Unified Diff: base/files/file_tracing.cc

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/files/file_tracing.h ('k') | base/files/file_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_tracing.cc
diff --git a/base/files/file_tracing.cc b/base/files/file_tracing.cc
index c25772db8ab5a101f47885ce58016eb576687dd7..92a5780b384cb8af4013acba197ff0e42541ec71 100644
--- a/base/files/file_tracing.cc
+++ b/base/files/file_tracing.cc
@@ -13,6 +13,11 @@ FileTracing::Provider* g_provider = nullptr;
}
// static
+bool FileTracing::IsCategoryEnabled() {
+ return g_provider && g_provider->FileTracingCategoryIsEnabled();
+}
+
+// static
void FileTracing::SetProvider(FileTracing::Provider* provider) {
g_provider = provider;
}
@@ -34,19 +39,11 @@ FileTracing::ScopedTrace::~ScopedTrace() {
g_provider->FileTracingEventEnd(name_, id_);
}
-bool FileTracing::ScopedTrace::ShouldInitialize() const {
- return g_provider && g_provider->FileTracingCategoryIsEnabled();
-}
-
void FileTracing::ScopedTrace::Initialize(
const char* name, File* file, int64 size) {
- if (!g_provider)
- return;
-
id_ = &file->trace_enabler_;
name_ = name;
-
- g_provider->FileTracingEventBegin(name_, id_, file->path_, size);
+ g_provider->FileTracingEventBegin(name_, id_, file->tracing_path_, size);
}
} // namespace base
« no previous file with comments | « base/files/file_tracing.h ('k') | base/files/file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698