DescriptionAdd WeakFileHandleFileWriter, a FileWriterInterface implementation that
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
Committed: https://chromium.googlesource.com/crashpad/crashpad/+/222f91f5c6e875929fabc00c6ba37698a2808172
Patch Set 1 #
Total comments: 1
Patch Set 2 : Rename to WeakFileHandleFileWriter #
Messages
Total messages: 11 (3 generated)
|