-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FilesTrash] Add parseTrashInfoFiles fileManagerPrivate API
The current method to parse .trashinfo files is to directly read the files via FileEntry.file() which presents a problem as the files are accessible by users. There has since been a sandboxed parsing service setup that opens and reads these files securely. This adds a FMP method that leverages that service to open .trashinfo files, parse their restore path and deletion date and return it back to the caller. Any errors encountered along the way on individual trashinfo files are skipped and not returned, this requires the .trashinfo filename to be sent back as a way to match it to the entries that were passed to the API. This exposes the `trash_info_path` on the `ParsedTrashInfoData` struct. In the process this tripped the complex constructor error on compilation [1] and thus had to also add a constructor / destructor in the process. Furthermore this doesn't actually wire up the API, this will be done in a follow up CL and all the existing browser tests will be used. [1] https://www.chromium.org/developers/coding-style/chromium-style-checker-errors/#constructordestructor-errors Bug: b:238946031 Change-Id: I3361f53c6b3ba2fdd40404888e8eac562496b3b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3827456 Reviewed-by: Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Ben Reich <benreich@chromium.org> Reviewed-by: Ben Wells <benwells@chromium.org> Cr-Commit-Position: refs/heads/main@{#1034965}
- Loading branch information
Showing
10 changed files
with
247 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters