Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 10041017: Show gpu process stats in about:tcmalloc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with correct (?) layering Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698