MCPcopy Create free account
hub / github.com/chromium/crashpad / InitializeFile

Function InitializeFile

util/linux/memory_map_test.cc:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void InitializeFile(const base::FilePath& path,
125 size_t size,
126 ScopedFileHandle* handle) {
127 ASSERT_FALSE(FileExists(path));
128
129 handle->reset(LoggingOpenFileForReadAndWrite(
130 path, FileWriteMode::kReuseOrCreate, FilePermissions::kOwnerOnly));
131 ASSERT_TRUE(handle->is_valid());
132 std::string file_contents(size, std::string::value_type());
133 CheckedWriteFile(handle->get(), file_contents.c_str(), file_contents.size());
134}
135
136class MapChildTest : public Multiprocess {
137 public:

Callers 2

MultiprocessChildMethod · 0.85
TESTFunction · 0.85

Calls 7

FileExistsFunction · 0.85
CheckedWriteFileFunction · 0.85
resetMethod · 0.45
is_validMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected