Commit cdef2bbb authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove unnecessary base::Passed() with base::BindOnce()

The documentation on base::Callback<...> (src/docs/callback.md)
recommends against using base::Passed(...) with base::BindOnce.

> Avoid using `base::Passed()` with `base::BindOnce()`, as `std::move()`
> does the same thing and is more familiar.

This CL was uploaded by git cl split.

Bug: 812523
Change-Id: I8208222c6d2dd1a1f26fef2725aabf2114febb23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611827
Commit-Queue: Tao Wu <wutao@chromium.org>
Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661153}
parent 38ace47e
...@@ -1401,12 +1401,7 @@ void AssistantManagerServiceImpl::CacheScreenContext( ...@@ -1401,12 +1401,7 @@ void AssistantManagerServiceImpl::CacheScreenContext(
// Our callback should be run only after both view hierarchy and screenshot // Our callback should be run only after both view hierarchy and screenshot
// data have been cached from their respective providers. // data have been cached from their respective providers.
auto on_done = auto on_done = base::BarrierClosure(2, std::move(callback));
base::BarrierClosure(2, base::BindOnce(
[](CacheScreenContextCallback callback) {
std::move(callback).Run();
},
base::Passed(std::move(callback))));
service_->client()->RequestAssistantStructure( service_->client()->RequestAssistantStructure(
base::BindOnce(&AssistantManagerServiceImpl::CacheAssistantStructure, base::BindOnce(&AssistantManagerServiceImpl::CacheAssistantStructure,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment