Allow FileEnumerator to expose enumeration errors
Adds an ErrorPolicy setting to base::FileEnumerator. By default (ErrorPolicy::IGNORE_ERRORS) all FileEnumerators behave as they always have. If set to ErrorPolicy::STOP_ENUMERATION however, a FileEnumerator will cease enumeration as soon as it encounters any error, and the corresponding error code can be retrieved from the FileEnumerator. The motivation for this change is that some existing logic in third_party/leveldb/env_chromium.cc duplicates most of FileEnumerator's behavior just to work around the lack of error reporting. This change will allow the code to be de-duplicated without disturbing error reporting histograms. Bug: 1052045 Change-Id: I0639029403fe42d1baef12075898e3cc9ec7f6a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2082559 Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by:Albert J. Wong <ajwong@chromium.org> Cr-Commit-Position: refs/heads/master@{#746988}
Showing
Please register or sign in to comment