Use OnceCallback on Mojo interfaces in //ipc

This CL flips `use_once_callback` flag on the Mojo code generator, and
fixes all compile errors after it. After this CL, Mojo interfaces in
//ipc starts using base::OnceCallback instead of base::Callback on its
return value handling.

The migration recipe was:
 - Convert pass-by-ref callback objects to pass-by-value.
 - Use std::move() to forward it to other consumer, or to invoke it
   with Callback::Run().
 - Handle wherever copies are required manually.
 - Check if the conversion doesn't change the semantics. As the transfer
   and invocation clobber the callback object, care about use-after-move.
   It's considered safe to consume almost scoped-out callback.

Bug: 714018
Change-Id: I1c2546fd822fb6997a1bbd77ba12fa560285ce00
Reviewed-on: https://chromium-review.googlesource.com/527734
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479556}

CrOS-Libchrome-Original-Commit: dd76ce71c57e2752f60fb012c49830fccbec5a9e
2 files changed
tree: 424f0ba87e8bc18d6a93253745b029723f503850
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/