parameters: (self)
return_statement: return None
docstring: Locates the the main chrome browser process.
  
      Chrome on cros is usually in /opt/google/chrome, but could be in
      /usr/local/ for developer workflows - debug chrome is too large to fit on
      rootfs.
  
      Chrome spawns multiple processes for renderers. pids wrap around after they
      are exhausted so looking for the smallest pid is not always correct. We
      locate the session_manager's pid, and look for the chrome process that's an
      immediate child. This is the main browser process.
docstring_summary: Locates the the main chrome browser process.
docstring_tokens: Locates the the main chrome browser process .
function: def _GetChromeProcess(self):
      """Locates the the main chrome browser process.
  
      Chrome on cros is usually in /opt/google/chrome, but could be in
      /usr/local/ for developer workflows - debug chrome is too large to fit on
      rootfs.
  
      Chrome spawns multiple processes for renderers. pids wrap around after they
      are exhausted so looking for the smallest pid is not always correct. We
      locate the session_manager's pid, and look for the chrome process that's an
      immediate child. This is the main browser process.
      """
      procs = self._cri.ListProcesses()
      session_manager_pid = self._GetSessionManagerPid(procs)
      if not session_manager_pid:
        return None
  
      # Find the chrome process that is the child of the session_manager.
      for pid, process, ppid, _ in procs:
        if ppid != session_manager_pid:
          continue
        for path in self.CHROME_PATHS:
          if process.startswith(path):
            return {'pid': pid, 'path': path, 'args': process}
      return None
function_tokens: def _GetChromeProcess ( self ) : procs = self . _cri . ListProcesses ( ) session_manager_pid = self . _GetSessionManagerPid ( procs ) if not session_manager_pid : return None # Find the chrome process that is the child of the session_manager. for pid , process , ppid , _ in procs : if ppid != session_manager_pid : continue for path in self . CHROME_PATHS : if process . startswith ( path ) : return { 'pid' : pid , 'path' : path , 'args' : process } return None