commit | 14fec317121ec6d1d3b61354548bf05d1f8eadcd | [log] [tgz] |
---|---|---|
author | kylechar <kylechar@chromium.org> | Wed Feb 20 17:40:19 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Feb 20 17:40:19 2019 |
tree | 58a6544b74b1ed0670071aa5c6d26828fab6184e | |
parent | 3b300c9c164fb9f4e6477b9019a1bd0c5f54c827 [diff] |
Use base::BindOnce for PostTask callbacks. TaskRunner::PostTask() takes a OnceCallback. Replace usage of base::Bind(), which produces a RepeatingCallback, with base::BindOnce() when the callback is created as a temporary inside of PostTask(). The following regex was used to find instances that could be replaced: (Post(?:Delayed)?Task)\((?:\n\s*)?FROM_HERE,(?:\n)?\s*base::Bind\( Also replace any usage of base::Passed(&var) with std::move(var) for variables passed to base::BindOnce(). base::Passed() isn't needed for move-only types with OnceCallbacks. This CL was uploaded by git cl split. R=rockot@google.com Bug: 714018 Change-Id: I6d57907a3aa4886b00851416b9ea002a39c9c5f9 Reviewed-on: https://chromium-review.googlesource.com/c/1475639 Auto-Submit: kylechar <kylechar@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#633762}
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 .