libbrillo: avoid double-binding callbacks and operator()

The second bind is a no-op since it doesn't provide any extra
arguments, so it's just an unnecessary allocation. Also, it looks
like new versions of base::Bind don't like functor objects, so
instead of packaging the callback's environment as part of an
enclosing object we should just bind in the bits we need as
arguments.

BUG=b:37434548
TEST=unit tests

Change-Id: I4bed9857655958f300bc99fa9508f2e940fc4a9a
Reviewed-on: https://chromium-review.googlesource.com/1064880
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
3 files changed