tools/vim/chromium.ycm_extra_conf.py
def FindChromeSrcFromFilename(filename):
  """Searches for the root of the Chromium checkout.

  Simply checks parent directories until it finds .gclient and src/.

  Args:
    filename: (String) Path to source file being edited.

  Returns:
    (String) Path of 'src/', or None if unable to find.
  """
  curdir = os.path.normpath(os.path.dirname(filename))
  while not (
      os.path.basename(curdir) == 'src' and PathExists(curdir, 'DEPS') and
      (PathExists(curdir, '..', '.gclient') or PathExists(curdir, '.git'))):
    nextdir = os.path.normpath(os.path.join(curdir, '..'))
    if nextdir == curdir:
      return None
    curdir = nextdir
  return curdir
Searches for the root of the Chromium checkout.

  Simply checks parent directories until it finds .gclient and src/.

  Args:
    filename: (String) Path to source file being edited.

  Returns:
    (String) Path of 'src/', or None if unable to find.
  
Searches for the root of the Chromium checkout.
Simply checks parent directories until it finds .gclient and src/.
Searches for the root of the Chromium checkout . Simply checks parent directories until it finds . gclient and src / .
def FindChromeSrcFromFilename(filename):
  curdir = os.path.normpath(os.path.dirname(filename))
  while not (
      os.path.basename(curdir) == 'src' and PathExists(curdir, 'DEPS') and
      (PathExists(curdir, '..', '.gclient') or PathExists(curdir, '.git'))):
    nextdir = os.path.normpath(os.path.join(curdir, '..'))
    if nextdir == curdir:
      return None
    curdir = nextdir
  return curdir
def FindChromeSrcFromFilename ( filename ) : curdir = os . path . normpath ( os . path . dirname ( filename ) ) while not ( os . path . basename ( curdir ) == 'src' and PathExists ( curdir , 'DEPS' ) and ( PathExists ( curdir , '..' , '.gclient' ) or PathExists ( curdir , '.git' ) ) ) : nextdir = os . path . normpath ( os . path . join ( curdir , '..' ) ) if nextdir == curdir : return None curdir = nextdir return curdir
Searches for the root of the Chromium checkout.
Searches for the root of the Chromium checkout .
"""Searches for the root of the Chromium checkout.

  Simply checks parent directories until it finds .gclient and src/.

  Args:
    filename: (String) Path to source file being edited.

  Returns:
    (String) Path of 'src/', or None if unable to find.
  """
(String) Path of 'src/', or None if unable to find.
( String ) Path of ' src / ' or None if unable to find .
filename
(String) Path to source file being edited.
( String ) Path to source file being edited .