Use base::BindOnce for Post[Delayed]TaskWithTraits callbacks.
Post[Delayed]TaskWithTraits() 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)?TaskWithTraits)\((?:\n\s*)?FROM_HERE,\n?\s*(\{.*?\n?.*?\}),(?:\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=blundell@chromium.org Bug: 714018 Change-Id: I4268e80cb016b4a8958ea4803656396f66854f11 Reviewed-on: https://chromium-review.googlesource.com/c/1486611 Auto-Submit: kylechar <kylechar@chromium.org> Reviewed-by:Colin Blundell <blundell@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#635452}
Showing
Please register or sign in to comment