Chromium Code Reviews| Index: chrome/browser/memory_details_mac.cc |
| diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc |
| index 89ae9c1cfb9b3fe3b777cff52f486be5d235756c..1443494818cb5d88d1f9f7eceba03d0f8c7b7565 100644 |
| --- a/chrome/browser/memory_details_mac.cc |
| +++ b/chrome/browser/memory_details_mac.cc |
| @@ -210,28 +210,13 @@ void MemoryDetails::CollectProcessData( |
| } |
| } |
| - // The helper might show up as these different flavors depending on the |
| - // executable flags required. |
| - std::vector<std::string> helper_names; |
| - helper_names.push_back(chrome::kHelperProcessExecutableName); |
| - for (const char* const* suffix = chrome::kHelperFlavorSuffixes; |
| - *suffix; |
| - ++suffix) { |
| - std::string helper_name = chrome::kHelperProcessExecutableName; |
| - helper_name.append(1, ' '); |
| - helper_name.append(*suffix); |
| - helper_names.push_back(helper_name); |
| - } |
| - |
| - // Get PIDs of helpers. |
| + // Get PIDs of the helper. |
|
Mark Mentovai
2015/09/17 23:48:29
The comment was correct before, “helpers,” because
|
| std::vector<base::ProcessId> helper_pids; |
| - for (size_t i = 0; i < helper_names.size(); ++i) { |
| - std::string helper_name = helper_names[i]; |
| - base::NamedProcessIterator helper_it(helper_name, NULL); |
| - while (const base::ProcessEntry* entry = helper_it.NextProcessEntry()) { |
| - helper_pids.push_back(entry->pid()); |
| - all_pids.push_back(entry->pid()); |
| - } |
| + base::NamedProcessIterator helper_it(chrome::kHelperProcessExecutableName, |
| + NULL); |
|
Mark Mentovai
2015/09/17 23:48:29
Use nullptr in new code.
|
| + while (const base::ProcessEntry* entry = helper_it.NextProcessEntry()) { |
| + helper_pids.push_back(entry->pid()); |
| + all_pids.push_back(entry->pid()); |
| } |
| if (mode == FROM_ALL_BROWSERS) { |