components/safe_browsing/content/resources/gen_file_type_proto.py
def ProcessPb(self, opts, pb):
        """ Generate one or more binary protos using the parsed proto. """
        if opts.type is not None:
            # Just one platform type
            platform_enum = PlatformTypes()[opts.type]
            outfile = os.path.join(opts.outdir, opts.outbasename)
            FilterForPlatformAndWrite(pb, platform_enum, outfile)
        else:
            # Make a separate file for each platform
            for platform_type, platform_enum in PlatformTypes().items():
                # e.g. .../all/77/chromeos/download_file_types.pb
                outfile = os.path.join(opts.outdir, str(pb.version_id),
                                       platform_type, opts.outbasename)
                MakeSubDirs(outfile)
                FilterForPlatformAndWrite(pb, platform_enum, outfile)
 Generate one or more binary protos using the parsed proto. 
Generate one or more binary protos using the parsed proto.
Generate one or more binary protos using the parsed proto .
def ProcessPb(self, opts, pb):
        if opts.type is not None:
            platform_enum = PlatformTypes()[opts.type]
            outfile = os.path.join(opts.outdir, opts.outbasename)
            FilterForPlatformAndWrite(pb, platform_enum, outfile)
        else:
            for platform_type, platform_enum in PlatformTypes().items():
                outfile = os.path.join(opts.outdir, str(pb.version_id),
                                       platform_type, opts.outbasename)
                MakeSubDirs(outfile)
                FilterForPlatformAndWrite(pb, platform_enum, outfile)
def ProcessPb ( self , opts , pb ) : if opts . type is not None : platform_enum = PlatformTypes ( ) [ opts . type ] outfile = os . path . join ( opts . outdir , opts . outbasename ) FilterForPlatformAndWrite ( pb , platform_enum , outfile ) else : for platform_type , platform_enum in PlatformTypes ( ) . items ( ) : outfile = os . path . join ( opts . outdir , str ( pb . version_id ) , platform_type , opts . outbasename ) MakeSubDirs ( outfile ) FilterForPlatformAndWrite ( pb , platform_enum , outfile )
Generate one or more binary protos using the parsed proto.
Generate one or more binary protos using the parsed proto .
""" Generate one or more binary protos using the parsed proto. """ # Just one platform type # Make a separate file for each platform # e.g. .../all/77/chromeos/download_file_types.pb
self
opts
pb