summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 19:22:22 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 19:22:22 +0000
commite1873b977ecb681d9261d9ce9fbe606e036b7d5b (patch)
treee1dc09a00cbc5037f861e8a31e52bfdcdb649f05
parentd70a0f3d0234806e7a39f40aee1b9b62d9c5d9c7 (diff)
downloadchromium_src-e1873b977ecb681d9261d9ce9fbe606e036b7d5b.zip
chromium_src-e1873b977ecb681d9261d9ce9fbe606e036b7d5b.tar.gz
chromium_src-e1873b977ecb681d9261d9ce9fbe606e036b7d5b.tar.bz2
When calculating memory details in linux (for about:memory), set the process
type from child_info collected on IO thread, if available. BUG=39111 TEST=manual Review URL: http://codereview.chromium.org/6969019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85302 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/memory_details_linux.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/memory_details_linux.cc b/chrome/browser/memory_details_linux.cc
index 96d80f1..132ba34 100644
--- a/chrome/browser/memory_details_linux.cc
+++ b/chrome/browser/memory_details_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -242,6 +242,21 @@ void MemoryDetails::CollectProcessData(
GetProcessDataMemoryInformation(current_browser_processes, &current_browser);
current_browser.name = WideToUTF16(chrome::kBrowserAppName);
current_browser.process_name = ASCIIToUTF16("chrome");
+
+ for (std::vector<ProcessMemoryInformation>::iterator
+ i = current_browser.processes.begin();
+ i != current_browser.processes.end(); ++i) {
+ // Check if this is one of the child processes whose data we collected
+ // on the IO thread, and if so copy over that data.
+ for (size_t child = 0; child < child_info.size(); child++) {
+ if (child_info[child].pid != i->pid)
+ continue;
+ i->titles = child_info[child].titles;
+ i->type = child_info[child].type;
+ break;
+ }
+ }
+
process_data_.push_back(current_browser);
// For each browser process, collect a list of its children and get the