| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test/chrome_process_util.h" | 5 #include "chrome/test/chrome_process_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
| 12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
| 13 #include "base/string_split.h" |
| 13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 14 | 15 |
| 15 MacChromeProcessInfoList GetRunningMacProcessInfo( | 16 MacChromeProcessInfoList GetRunningMacProcessInfo( |
| 16 const ChromeProcessList &process_list) { | 17 const ChromeProcessList &process_list) { |
| 17 MacChromeProcessInfoList result; | 18 MacChromeProcessInfoList result; |
| 18 | 19 |
| 19 // Build up the ps command line | 20 // Build up the ps command line |
| 20 std::vector<std::string> cmdline; | 21 std::vector<std::string> cmdline; |
| 21 cmdline.push_back("ps"); | 22 cmdline.push_back("ps"); |
| 22 cmdline.push_back("-o"); | 23 cmdline.push_back("-o"); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 GetMemoryValuesHack(process_handle_, &virtual_size, &working_set_size); | 99 GetMemoryValuesHack(process_handle_, &virtual_size, &working_set_size); |
| 99 return virtual_size; | 100 return virtual_size; |
| 100 } | 101 } |
| 101 | 102 |
| 102 size_t ChromeTestProcessMetrics::GetWorkingSetSize() { | 103 size_t ChromeTestProcessMetrics::GetWorkingSetSize() { |
| 103 size_t virtual_size; | 104 size_t virtual_size; |
| 104 size_t working_set_size; | 105 size_t working_set_size; |
| 105 GetMemoryValuesHack(process_handle_, &virtual_size, &working_set_size); | 106 GetMemoryValuesHack(process_handle_, &virtual_size, &working_set_size); |
| 106 return working_set_size; | 107 return working_set_size; |
| 107 } | 108 } |
| OLD | NEW |