Index: content/browser/trace_subscriber_stdio.cc |
diff --git a/content/browser/trace_subscriber_stdio.cc b/content/browser/trace_subscriber_stdio.cc |
index a55c611a8f9777819f4c279856696ccc3f734db8..e390212b8fe4085ea625a1a122085a62d7704c3b 100644 |
--- a/content/browser/trace_subscriber_stdio.cc |
+++ b/content/browser/trace_subscriber_stdio.cc |
@@ -20,10 +20,6 @@ class TraceSubscriberStdioImpl |
: path_(path), |
file_(0) {} |
- ~TraceSubscriberStdioImpl() { |
- CloseFile(); |
- } |
- |
void OnStart() { |
DCHECK(!file_); |
file_ = file_util::OpenFile(path_, "w+"); |
@@ -47,6 +43,12 @@ class TraceSubscriberStdioImpl |
} |
private: |
+ friend class base::RefCountedThreadSafe<TraceSubscriberStdioImpl>; |
+ |
+ ~TraceSubscriberStdioImpl() { |
+ CloseFile(); |
+ } |
+ |
bool IsValid() { |
return file_ && (0 == ferror(file_)); |
} |