Only set File::[tracing_]path_ when file tracing is enabled.

R=rvargas@chromium.org
BUG=none
TEST=less |path_| cruft lying around

Review URL: https://codereview.chromium.org/1216183004

Cr-Commit-Position: refs/heads/master@{#337168}


CrOS-Libchrome-Original-Commit: fd5b108c82d56f6022dfbe62a023d1e81ff6f83b
diff --git a/base/files/file_tracing.h b/base/files/file_tracing.h
index 149bd78..92324c9 100644
--- a/base/files/file_tracing.h
+++ b/base/files/file_tracing.h
@@ -13,7 +13,7 @@
 
 #define SCOPED_FILE_TRACE_WITH_SIZE(name, size) \
     FileTracing::ScopedTrace scoped_file_trace; \
-    if (scoped_file_trace.ShouldInitialize()) \
+    if (FileTracing::IsCategoryEnabled()) \
       scoped_file_trace.Initialize(FILE_TRACING_PREFIX "::" name, this, size)
 
 #define SCOPED_FILE_TRACE(name) SCOPED_FILE_TRACE_WITH_SIZE(name, 0)
@@ -25,6 +25,9 @@
 
 class BASE_EXPORT FileTracing {
  public:
+  // Whether the file tracing category is enabled.
+  static bool IsCategoryEnabled();
+
   class Provider {
    public:
     // Whether the file tracing category is currently enabled.
@@ -61,9 +64,6 @@
     ScopedTrace();
     ~ScopedTrace();
 
-    // Whether this trace should be initialized or not.
-    bool ShouldInitialize() const;
-
     // Called only if the tracing category is enabled. |name| is the name of the
     // 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