Commit 5ce313db 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: none
Change-Id: Ia1746a73a38d8e53e08a307a9f6134136e102d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611890Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659531}
parent 4e878f71
......@@ -34,7 +34,7 @@ base::OnceClosure MaybeWrapWithGPUSandboxHook(
if (sandbox_type != service_manager::SANDBOX_TYPE_GPU)
return original;
return base::Bind(
return base::BindOnce(
[](base::OnceClosure arg) {
// We need to gather GPUInfo and compute GpuFeatureInfo here, so we can
// decide if initializing core profile or compatibility profile GL,
......@@ -72,7 +72,7 @@ base::OnceClosure MaybeWrapWithGPUSandboxHook(
if (!arg.is_null())
std::move(arg).Run();
},
base::Passed(std::move(original)));
std::move(original));
}
// Fill in |sandbox_type| based on the command line. Returns false if the
......
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