commit | 049425c19c99b70e5ef2259f43f7465ac5992f9c | [log] [tgz] |
---|---|---|
author | Antonio Gomes <tonikitoo@igalia.com> | Thu Mar 21 20:43:26 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Mar 21 20:43:26 2019 |
tree | db2b51df58e541fc186e28683133ce6b67e21413 | |
parent | d117241618f7416f6e4d9808c2d12d0aba48fd81 [diff] |
Migrate EntriesCallback to use simple success/failure callbacks This CL is a continuation of the effort to simplify the callbacks implementation in t_p/b/renderer/modules/filesystem/file_system_callbacks.h At this time, EntriesCallbacks wrapper class is migrated to use simple (BindOnce) callbacks, one for success, another for failure. Note that EntriesCallbacks closures did not share the same callback completion implementation as some other methods that use the templates in async_callback_helper.h. Additionally, the success callback can be called more than once for the same object. Hence 1) WTF::BindRepeating is used for EntriesCallbacks::SuccessCallback . 2) The callback completion bodies were inlined (eg file_system_directory_iterator.cc, directory_reader_sync.cc and directory_reader.cc). Additionally, that EntriesCallbacks was the last class in file_system_callbacks.h to be migrated to success/failures callbacks, instead of wrapper classes. Its switch over to simple callbacks for success/failure closures allowed the following classes to be removed: - DirectoryReader::EntriesCallbackHelper and ErrorCallbackHelper. - DirectoryReaderSync::EntriesCallbackHelper and ErrorCallbackHelper. - FileSystemDirectoryIterator::EntriesCallbackHelper and ErrorCallbackHelper. - EntriesCallbacks::OnDidGetEntriesCallback Follow up tasks: - Remove ErrorCallbackBase and ScriptErrorCallback altogether. - Remove the (now) unused ReportError overloads in dom_file_system_base.h|cc, dom_file_system.h|cc and dom_file_system_sync.h|cc. - Experiment with approaches to remove FileSystemCallbacksBase, and invoke callbacks from file_system_dispatcher.cc directly. R=mek@chromium.org CC=​blink-reviews-vendor@chromium.org BUG=933878 Change-Id: I3d6505fa49f05a3bd2cd72db69ecb6f7bb983ed0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1532943 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Auto-Submit: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#643100}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .