Index: base/process_util.cc |
diff --git a/base/process_util.cc b/base/process_util.cc |
index 7fe1a8575b80d70b8621e1c930eeb3a4e0803ee6..d62519b559044de0061690f6719db94676c83cd3 100644 |
--- a/base/process_util.cc |
+++ b/base/process_util.cc |
@@ -60,6 +60,16 @@ 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) |
brettw
2011/08/24 20:46:58
Use {} for multiple-line conditionals.
michaelbai
2011/08/24 23:02:18
Done.
|
+ executable_name_ = FilePath::StringType(executable_name_, |
+ executable_name_.size() - 15, 15); |
+#endif |
} |
NamedProcessIterator::~NamedProcessIterator() { |