Update base::DoNothing() / base::NullCallback() to use a type tag.

This allows both helpers to be used in contexts where the original
helper required templated arguments to be explicitly specified,
generally leading to more concise code.

However, since base::DoNothing() only returns a type tag now, it can no
longer be used as a functor with base::BindOnce/base::BindRepeating.
In general, this seems to be a net neutral to slight positive change:
the lambda version is actually shorter—though some might argue less
readable—and it generates more efficient code since running the callback
now jumps through one less thunk.

Bug: 1252980
Change-Id: I6b72230fe9d583865ff3d40fc51025f6195ebbc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3180101
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927031}
NOKEYCHECK=True
GitOrigin-RevId: e0fc463ca6d8dedd64bb520779aa367c0831581b
1 file changed