mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-28 07:48:14 +08:00
222f91f5c6
deals solely with a weak FileHandle. CrashReportDatabase::PrepareNewCrashReport() provides its caller with both a FileHandle and a FilePath. While it’s possible to create a FileWriter from the FilePath, it’s not necessary to have two FileHandles open to the same file. Also, there’s no FileWriteMode::kReuseOrFail option because it didn’t seem necessary[1], and although it would actually be the most desirable option for a FileWriter here, allowing the FileHandle to be used directly without reopening the file sidesteps the problem entirely. FileWriter is adapted to use WeakFileHandleFileWriter to minimize duplication. [1] https://codereview.chromium.org/818433002/diff/80001/util/file/file_io.h#newcode138 R=rsesek@chromium.org, scottmg@chromium.org Review URL: https://codereview.chromium.org/871193010