0

Fix browser.memory_stats has no GPU and Renderer info on CrOS

BUG=284219
TEST=run related code on daisy
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/23745007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221637 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
owenlin@chromium.org
2013-09-06 08:00:41 +00:00
parent 5252d391ca
commit e3e7a598ed

@ -56,14 +56,13 @@ class CrosPlatformBackend(platform_backend.PlatformBackend):
def GetChildPids(self, pid):
"""Returns a list of child pids of |pid|."""
all_process_info = self._cri.ListProcesses()
processes = []
for pid, _, ppid, state in all_process_info:
processes.append((pid, ppid, state))
processes = [(curr_pid, curr_ppid, curr_state)
for curr_pid, _, curr_ppid, curr_state in all_process_info]
return proc_util.GetChildPids(processes, pid)
def GetCommandLine(self, pid):
command = self._GetPsOutput(['command'], pid)
return command[0] if command else None
command = self._GetFileContents('/proc/%s/cmdline' % pid)
return command if command else None
def CanFlushIndividualFilesFromSystemCache(self):
return True