diff options
-rw-r--r-- | content/browser/trace_subscriber_stdio.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/browser/trace_subscriber_stdio.cc b/content/browser/trace_subscriber_stdio.cc index a102810..05ebaba 100644 --- a/content/browser/trace_subscriber_stdio.cc +++ b/content/browser/trace_subscriber_stdio.cc @@ -22,11 +22,11 @@ class TraceSubscriberStdioImpl void OnStart() { DCHECK(!file_); + trace_buffer_.SetOutputCallback( + base::Bind(&TraceSubscriberStdioImpl::Write, this)); file_ = file_util::OpenFile(path_, "w+"); if (IsValid()) { LOG(INFO) << "Logging performance trace to file: " << path_.value(); - trace_buffer_.SetOutputCallback( - base::Bind(&TraceSubscriberStdioImpl::Write, this)); trace_buffer_.Start(); } else { LOG(ERROR) << "Failed to open performance trace file: " << path_.value(); @@ -49,7 +49,7 @@ class TraceSubscriberStdioImpl CloseFile(); } - bool IsValid() { + bool IsValid() const { return file_ && (0 == ferror(file_)); } |