OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 #if defined(USE_TCMALLOC) | 195 #if defined(USE_TCMALLOC) |
196 // static | 196 // static |
197 AboutTcmallocOutputs* AboutTcmallocOutputs::GetInstance() { | 197 AboutTcmallocOutputs* AboutTcmallocOutputs::GetInstance() { |
198 return Singleton<AboutTcmallocOutputs>::get(); | 198 return Singleton<AboutTcmallocOutputs>::get(); |
199 } | 199 } |
200 | 200 |
201 AboutTcmallocOutputs::AboutTcmallocOutputs() {} | 201 AboutTcmallocOutputs::AboutTcmallocOutputs() {} |
202 | 202 |
203 AboutTcmallocOutputs::~AboutTcmallocOutputs() {} | 203 AboutTcmallocOutputs::~AboutTcmallocOutputs() {} |
204 | 204 |
205 // Glue between the callback task and the method in the singleton. | 205 void AboutTcmallocOutputs::OnStatsForChildProcess( |
206 void AboutTcmallocRendererCallback(base::ProcessId pid, | 206 base::ProcessId pid, content::ProcessType process_type, |
207 const std::string& output) { | 207 const std::string& output) { |
208 AboutTcmallocOutputs::GetInstance()->RendererCallback(pid, output); | 208 std::string header = content::GetProcessTypeNameInEnglish(process_type); |
| 209 base::StringAppendF(&header, " PID %d", static_cast<int>(pid)); |
| 210 SetOutput(header, output); |
209 } | 211 } |
210 #endif | 212 #endif |
OLD | NEW |