-
Bruce Dawson authored
Anti-virus programs and other scanners may briefly lock new files which can lead to frequent problems with saving bookmarks and other files that use the ImportantFileWriter. This attempts to deal with this by retrying the racy ReplaceFile step a few times. This change also adds instrumentation to record how many retries are needed, for future tuning. It also moves the SetLastError call as close as possible to the function that will consume the last error code. This is only done on Windows because that is hoped to be the only place where it happens. Bug: 1099284 Change-Id: I7aa9a27e137d3df2c402de5f13bbe911521a711d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2559156Reviewed-by:
Steven Holte <holte@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Greg Thompson <grt@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/master@{#839668}
3565fc3c