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=rogerta@chromium.org Bug: 714018 Change-Id: I6b26b0eb43cb5167e8c115781c956bfe13d6bdfc Reviewed-on: https://chromium-review.googlesource.com/c/1475637 Auto-Submit: kylechar <kylechar@chromium.org> Reviewed-by:Roger Tawa <rogerta@chromium.org> Commit-Queue: Roger Tawa <rogerta@chromium.org> Cr-Commit-Position: refs/heads/master@{#632809}
Showing
This diff is collapsed.
Please register or sign in to comment