commit | 756e0dcb642445863a7670c482c05ba39cf2ba0d | [log] [tgz] |
---|---|---|
author | kylechar <kylechar@chromium.org> | Fri Feb 15 21:45:14 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 15 21:45:14 2019 |
tree | 6e159dd6ca5e3e92c705a614ce6fe4bd8b815bef | |
parent | 3ab063854fabbe71bdb963f6d1708167bcadf573 [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=zea@chromium.org Bug: 714018 Change-Id: I563c61da47057260e97bb3989d571f1edc2514e7 Reviewed-on: https://chromium-review.googlesource.com/c/1475646 Auto-Submit: kylechar <kylechar@chromium.org> Reviewed-by: Nicolas Zea <zea@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#632766}
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 .