| Index: chrome/browser/process_info_snapshot_mac.cc
|
| diff --git a/chrome/browser/process_info_snapshot_mac.cc b/chrome/browser/process_info_snapshot_mac.cc
|
| index 7e8117be6742e30171e57afb3aecb2b265da5d50..611f8f40a90f48f8c3408d35437fa2da35b75b67 100644
|
| --- a/chrome/browser/process_info_snapshot_mac.cc
|
| +++ b/chrome/browser/process_info_snapshot_mac.cc
|
| @@ -25,10 +25,11 @@ ProcessInfoSnapshot::~ProcessInfoSnapshot() {
|
| // Note: we ignore the "tsiz" (text size) display option of ps because it's
|
| // always zero (tested on 10.5 and 10.6).
|
| bool ProcessInfoSnapshot::Sample(std::vector<base::ProcessId> pid_list) {
|
| + const char* kPsPathName = "/bin/ps";
|
| Reset();
|
|
|
| std::vector<std::string> argv;
|
| - argv.push_back("/bin/ps");
|
| + argv.push_back(kPsPathName);
|
| // Get PID, PPID, (real) UID, effective UID, resident set size, virtual memory
|
| // size, and command.
|
| argv.push_back("-o");
|
| @@ -44,7 +45,7 @@ bool ProcessInfoSnapshot::Sample(std::vector<base::ProcessId> pid_list) {
|
| CommandLine command_line(argv);
|
| if (!base::GetAppOutputRestricted(command_line,
|
| &output, (pid_list.size() + 10) * 100)) {
|
| - LOG(ERROR) << "Failure running /bin/ps to acquire data.";
|
| + LOG(ERROR) << "Failure running " << kPsPathName << " to acquire data.";
|
| return false;
|
| }
|
|
|
| @@ -70,18 +71,18 @@ bool ProcessInfoSnapshot::Sample(std::vector<base::ProcessId> pid_list) {
|
| in.ignore(1, ' '); // Eat the space.
|
| std::getline(in, proc_info.command); // Get the rest of the line.
|
| if (!in.good()) {
|
| - LOG(ERROR) << "Error parsing output from /usr/bin/top.";
|
| + LOG(ERROR) << "Error parsing output from " << kPsPathName << ".";
|
| return false;
|
| }
|
|
|
| // Make sure the new PID isn't already in our list.
|
| if (proc_info_entries_.find(proc_info.pid) != proc_info_entries_.end()) {
|
| - LOG(ERROR) << "Duplicate PID in output from /bin/ps.";
|
| + LOG(ERROR) << "Duplicate PID in output from " << kPsPathName << ".";
|
| return false;
|
| }
|
|
|
| if (!proc_info.pid || ! proc_info.vsize) {
|
| - LOG(WARNING) << "Invalid data from /bin/ps.";
|
| + LOG(WARNING) << "Invalid data from " << kPsPathName << ".";
|
| return false;
|
| }
|
|
|
|
|