Lines Matching full:toc
60 int EmbedFile::CreateFdForFileToc(const FileToc* toc) { in CreateFdForFileToc() argument
63 if (!sandbox2::util::CreateMemFd(&fd, toc->name)) { in CreateFdForFileToc()
64 SAPI_RAW_LOG(ERROR, "Couldn't create a temporary file for TOC name '%s'", in CreateFdForFileToc()
65 toc->name); in CreateFdForFileToc()
70 if (!file_util::fileops::WriteToFD(embed_fd.get(), toc->data, toc->size)) { in CreateFdForFileToc()
72 toc->name); in CreateFdForFileToc()
101 int EmbedFile::GetFdForFileToc(const FileToc* toc) { in GetFdForFileToc() argument
105 // If a file-descriptor for this toc already exists, just return it. in GetFdForFileToc()
106 auto entry = file_tocs_.find(toc); in GetFdForFileToc()
111 toc->name, entry->second, entry->first->name); in GetFdForFileToc()
115 int embed_fd = CreateFdForFileToc(toc); in GetFdForFileToc()
117 SAPI_RAW_LOG(ERROR, "Cannot create a file for FileTOC: '%s'", toc->name); in GetFdForFileToc()
122 toc->name, embed_fd); in GetFdForFileToc()
124 file_tocs_[toc] = embed_fd; in GetFdForFileToc()
128 int EmbedFile::GetDupFdForFileToc(const FileToc* toc) { in GetDupFdForFileToc() argument
129 int fd = GetFdForFileToc(toc); in GetDupFdForFileToc()