Lines Matching full:toc
62 int EmbedFile::CreateFdForFileToc(const FileToc* toc) { in CreateFdForFileToc() argument
65 if (!sandbox2::util::CreateMemFd(&fd, toc->name)) { in CreateFdForFileToc()
66 SAPI_RAW_LOG(ERROR, "Couldn't create a temporary file for TOC name '%s'", in CreateFdForFileToc()
67 toc->name); in CreateFdForFileToc()
72 if (!file_util::fileops::WriteToFD(embed_fd.get(), toc->data, toc->size)) { in CreateFdForFileToc()
74 toc->name); in CreateFdForFileToc()
103 int EmbedFile::GetFdForFileToc(const FileToc* toc) { in GetFdForFileToc() argument
107 // If a file-descriptor for this toc already exists, just return it. in GetFdForFileToc()
108 auto entry = file_tocs_.find(toc); in GetFdForFileToc()
113 toc->name, entry->second.get(), entry->first->name); in GetFdForFileToc()
117 int embed_fd = CreateFdForFileToc(toc); in GetFdForFileToc()
119 SAPI_RAW_LOG(ERROR, "Cannot create a file for FileTOC: '%s'", toc->name); in GetFdForFileToc()
124 toc->name, embed_fd); in GetFdForFileToc()
126 file_tocs_[toc] = FDCloser(embed_fd); in GetFdForFileToc()
130 int EmbedFile::GetDupFdForFileToc(const FileToc* toc) { in GetDupFdForFileToc() argument
131 int fd = GetFdForFileToc(toc); in GetDupFdForFileToc()