Index: content/browser/profiler_controller_impl.cc |
diff --git a/content/browser/profiler_controller_impl.cc b/content/browser/profiler_controller_impl.cc |
index a850cfd92c3e696eb53240217f1d35b49b0c0310..9a6c6fe778765e5855b563016b08ab7a4e9202a5 100644 |
--- a/content/browser/profiler_controller_impl.cc |
+++ b/content/browser/profiler_controller_impl.cc |
@@ -62,6 +62,28 @@ void ProfilerControllerImpl::OnProfilerDataCollected( |
} |
} |
+#if defined(USE_TCMALLOC) |
+void ProfilerControllerImpl::OnTcmallocStatsCollected( |
+ base::ProcessId pid, |
+ ProcessType process_type, |
+ const std::string& output) { |
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
+ BrowserThread::PostTask( |
+ BrowserThread::UI, FROM_HERE, |
+ base::Bind(&ProfilerControllerImpl::OnTcmallocStatsCollected, |
+ base::Unretained(this), |
+ pid, |
+ process_type, |
+ output)); |
+ return; |
+ } |
+ |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ if (subscriber_) |
+ subscriber_->OnTcmallocStatsCollected(pid, process_type, output); |
+} |
+#endif |
+ |
void ProfilerControllerImpl::Register(ProfilerSubscriber* subscriber) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
DCHECK(!subscriber_); |