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

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: address nits, call OnStatsForChildProcess directly from IO thread instead of posting to UI 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "chrome/browser/net/url_fixer_upper.h" 13 #include "chrome/browser/net/url_fixer_upper.h"
14 #include "chrome/browser/ui/browser_dialogs.h" 14 #include "chrome/browser/ui/browser_dialogs.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 17
18 #if defined(USE_TCMALLOC)
19 #include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h"
20 #endif
21
22 namespace { 18 namespace {
23 19
24 // Add paths here to be included in chrome://chrome-urls (about:about). 20 // Add paths here to be included in chrome://chrome-urls (about:about).
25 // These paths will also be suggested by BuiltinProvider. 21 // These paths will also be suggested by BuiltinProvider.
26 const char* const kChromePaths[] = { 22 const char* const kChromePaths[] = {
27 chrome::kChromeUIAppCacheInternalsHost, 23 chrome::kChromeUIAppCacheInternalsHost,
28 chrome::kChromeUIBlobInternalsHost, 24 chrome::kChromeUIBlobInternalsHost,
29 chrome::kChromeUIBookmarksHost, 25 chrome::kChromeUIBookmarksHost,
30 chrome::kChromeUICacheHost, 26 chrome::kChromeUICacheHost,
31 chrome::kChromeUIChromeURLsHost, 27 chrome::kChromeUIChromeURLsHost,
(...skipping 19 matching lines...) Expand all
51 chrome::kChromeUIPluginsHost, 47 chrome::kChromeUIPluginsHost,
52 chrome::kChromeUIPolicyHost, 48 chrome::kChromeUIPolicyHost,
53 chrome::kChromeUIPrintHost, 49 chrome::kChromeUIPrintHost,
54 chrome::kChromeUIProfilerHost, 50 chrome::kChromeUIProfilerHost,
55 chrome::kChromeUIQuotaInternalsHost, 51 chrome::kChromeUIQuotaInternalsHost,
56 chrome::kChromeUISessionsHost, 52 chrome::kChromeUISessionsHost,
57 chrome::kChromeUISettingsHost, 53 chrome::kChromeUISettingsHost,
58 chrome::kChromeUIStatsHost, 54 chrome::kChromeUIStatsHost,
59 chrome::kChromeUISyncInternalsHost, 55 chrome::kChromeUISyncInternalsHost,
60 chrome::kChromeUITaskManagerHost, 56 chrome::kChromeUITaskManagerHost,
61 chrome::kChromeUITCMallocHost,
62 chrome::kChromeUITermsHost, 57 chrome::kChromeUITermsHost,
63 chrome::kChromeUITracingHost, 58 chrome::kChromeUITracingHost,
64 chrome::kChromeUIVersionHost, 59 chrome::kChromeUIVersionHost,
65 #if defined(OS_WIN) 60 #if defined(OS_WIN)
66 chrome::kChromeUIConflictsHost, 61 chrome::kChromeUIConflictsHost,
67 #endif 62 #endif
68 #if defined(OS_LINUX) || defined(OS_OPENBSD) 63 #if defined(OS_LINUX) || defined(OS_OPENBSD)
69 chrome::kChromeUILinuxProxyConfigHost, 64 chrome::kChromeUILinuxProxyConfigHost,
70 chrome::kChromeUISandboxHost, 65 chrome::kChromeUISandboxHost,
71 #endif 66 #endif
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 158 }
164 159
165 std::vector<std::string> ChromePaths() { 160 std::vector<std::string> ChromePaths() {
166 std::vector<std::string> paths; 161 std::vector<std::string> paths;
167 paths.reserve(arraysize(kChromePaths)); 162 paths.reserve(arraysize(kChromePaths));
168 for (size_t i = 0; i < arraysize(kChromePaths); i++) 163 for (size_t i = 0; i < arraysize(kChromePaths); i++)
169 paths.push_back(kChromePaths[i]); 164 paths.push_back(kChromePaths[i]);
170 return paths; 165 return paths;
171 } 166 }
172 167
173 #if defined(USE_TCMALLOC)
174 // static
175 AboutTcmallocOutputs* AboutTcmallocOutputs::GetInstance() {
176 return Singleton<AboutTcmallocOutputs>::get();
177 }
178
179 AboutTcmallocOutputs::AboutTcmallocOutputs() {}
180
181 AboutTcmallocOutputs::~AboutTcmallocOutputs() {}
182
183 // Glue between the callback task and the method in the singleton.
184 void AboutTcmallocRendererCallback(base::ProcessId pid,
185 const std::string& output) {
186 AboutTcmallocOutputs::GetInstance()->RendererCallback(pid, output);
187 }
188 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698