| Index: base/process_util.cc
|
| diff --git a/base/process_util.cc b/base/process_util.cc
|
| index 7fe1a8575b80d70b8621e1c930eeb3a4e0803ee6..9979dfa07b1b06ee9d8aca814da04907200f077d 100644
|
| --- a/base/process_util.cc
|
| +++ b/base/process_util.cc
|
| @@ -60,6 +60,17 @@ NamedProcessIterator::NamedProcessIterator(
|
| const FilePath::StringType& executable_name,
|
| const ProcessFilter* filter) : ProcessIterator(filter),
|
| executable_name_(executable_name) {
|
| +#if defined(OS_ANDROID)
|
| + // On Android, the process name contains only the last 15 characters, which
|
| + // is in file /proc/<pid>/stat, the string between open parenthesis and close
|
| + // parenthesis. Please See ProcessIterator::CheckForNextProcess for details.
|
| + // Now if the length of input process name is greater than 15, only save the
|
| + // last 15 characters.
|
| + if (executable_name_.size() > 15) {
|
| + executable_name_ = FilePath::StringType(executable_name_,
|
| + executable_name_.size() - 15, 15);
|
| + }
|
| +#endif
|
| }
|
|
|
| NamedProcessIterator::~NamedProcessIterator() {
|
|
|