OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/process/process_iterator.h" | 5 #include "base/process/process_iterator.h" |
6 | 6 |
| 7 #include <sys/types.h> |
7 #include <sys/sysctl.h> | 8 #include <sys/sysctl.h> |
| 9 #include <unistd.h> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 | 15 |
14 ProcessIterator::ProcessIterator(const ProcessFilter* filter) | 16 ProcessIterator::ProcessIterator(const ProcessFilter* filter) |
15 : index_of_kinfo_proc_(), | 17 : index_of_kinfo_proc_(), |
16 filter_(filter) { | 18 filter_(filter) { |
17 | 19 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 117 } |
116 | 118 |
117 bool NamedProcessIterator::IncludeEntry() { | 119 bool NamedProcessIterator::IncludeEntry() { |
118 if (executable_name_ != entry().exe_file()) | 120 if (executable_name_ != entry().exe_file()) |
119 return false; | 121 return false; |
120 | 122 |
121 return ProcessIterator::IncludeEntry(); | 123 return ProcessIterator::IncludeEntry(); |
122 } | 124 } |
123 | 125 |
124 } // namespace base | 126 } // namespace base |
OLD | NEW |