summaryrefslogtreecommitdiffstats
path: root/base/process_util_mac.mm
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 12:46:38 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 12:46:38 +0000
commitf0a51fb571f46531025fa09240bbc3e1af925e84 (patch)
tree558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /base/process_util_mac.mm
parent6390be368205705f49ead3cec40396519f13b889 (diff)
downloadchromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip
chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz
chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_mac.mm')
-rw-r--r--base/process_util_mac.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
index f90070b..ff78c07 100644
--- a/base/process_util_mac.mm
+++ b/base/process_util_mac.mm
@@ -158,7 +158,7 @@ const ProcessEntry* NamedProcessIterator::NextProcessEntry() {
if (result) {
return &entry_;
}
-
+
return NULL;
}
@@ -167,14 +167,14 @@ bool NamedProcessIterator::CheckForNextProcess() {
std::string data;
std::string exec_name;
-
+
for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
kinfo_proc* kinfo = &kinfo_procs_[index_of_kinfo_proc_];
// Skip processes just awaiting collection
if ((kinfo->kp_proc.p_pid > 0) && (kinfo->kp_proc.p_stat == SZOMB))
continue;
-
+
int mib[] = { CTL_KERN, KERN_PROCARGS, kinfo->kp_proc.p_pid };
// Found out what size buffer we need
@@ -183,13 +183,13 @@ bool NamedProcessIterator::CheckForNextProcess() {
LOG(ERROR) << "failed to figure out the buffer size for a commandline";
continue;
}
-
+
data.resize(data_len);
if (sysctl(mib, arraysize(mib), &data[0], &data_len, NULL, 0) < 0) {
LOG(ERROR) << "failed to fetch a commandline";
continue;
}
-
+
// Data starts w/ the full path null termed, so we have to extract just the
// executable name from the path.
@@ -203,7 +203,7 @@ bool NamedProcessIterator::CheckForNextProcess() {
exec_name = data.substr(0, exec_name_end);
else
exec_name = data.substr(last_slash + 1, exec_name_end - last_slash - 1);
-
+
// Check the name
if (executable_name_utf8 == exec_name) {
entry_.pid = kinfo->kp_proc.p_pid;