chrome/PRESUBMIT.py
def _CheckNoOSAPPLEMacrosInChromeFile(input_api, f):
  """Check for OS_APPLE in a given file in chrome/."""
  preprocessor_statement = input_api.re.compile(r'^\s*#')
  apple_macro = input_api.re.compile(r'defined\(OS_APPLE\)')
  results = []
  for lnum, line in f.ChangedContents():
    if preprocessor_statement.search(line) and apple_macro.search(line):
      results.append('    %s:%d' % (f.LocalPath(), lnum))

  return results
Check for OS_APPLE in a given file in chrome/.
Check for OS_APPLE in a given file in chrome/.
Check for OS_APPLE in a given file in chrome / .
def _CheckNoOSAPPLEMacrosInChromeFile(input_api, f):
  preprocessor_statement = input_api.re.compile(r'^\s*#')
  apple_macro = input_api.re.compile(r'defined\(OS_APPLE\)')
  results = []
  for lnum, line in f.ChangedContents():
    if preprocessor_statement.search(line) and apple_macro.search(line):
      results.append('    %s:%d' % (f.LocalPath(), lnum))
  return results
def _CheckNoOSAPPLEMacrosInChromeFile ( input_api , f ) : preprocessor_statement = input_api . re . compile ( r'^\s*#' ) apple_macro = input_api . re . compile ( r'defined\(OS_APPLE\)' ) results = [ ] for lnum , line in f . ChangedContents ( ) : if preprocessor_statement . search ( line ) and apple_macro . search ( line ) : results . append ( '    %s:%d' % ( f . LocalPath ( ) , lnum ) ) return results
Check for OS_APPLE in a given file in chrome/.
Check for OS_APPLE in a given file in chrome / .
"""Check for OS_APPLE in a given file in chrome/."""
input_api
f