Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Issue 2872563002: Use OnceCallback on Mojo interfaces in //device/gamepad (Closed)

Created:
3 years, 7 months ago by tzik
Modified:
3 years, 7 months ago
Reviewers:
dcheng, scottmg
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use OnceCallback on Mojo interfaces in //device/gamepad This CL flips `use_once_calback` flag on the Mojo code generator, and fixes all compile errors after it. After this CL, Mojo interfaces in //device/gamepad 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 Review-Url: https://codereview.chromium.org/2872563002 Cr-Commit-Position: refs/heads/master@{#471779} Committed: https://chromium.googlesource.com/chromium/src/+/d9b1d7c05d1d18606bad0a0ebfb75e7240c4b5e1

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -18 lines) Patch
M device/gamepad/gamepad_monitor.h View 1 chunk +2 lines, -3 lines 0 comments Download
M device/gamepad/gamepad_monitor.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M device/gamepad/public/interfaces/BUILD.gn View 2 2 chunks +0 lines, -6 lines 0 comments Download
M device/gamepad/public/interfaces/gamepad_struct_traits_unittest.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 38 (28 generated)
tzik
PTAL
3 years, 7 months ago (2017-05-11 09:13:55 UTC) #19
scottmg
lgtm
3 years, 7 months ago (2017-05-11 15:00:06 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2872563002/40001
3 years, 7 months ago (2017-05-11 16:13:31 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/434165)
3 years, 7 months ago (2017-05-11 16:25:56 UTC) #26
tzik
Adding dcheng as a SECURITY_OWNER for gamepad_struct_traits_unittest.cc review. PTAL.
3 years, 7 months ago (2017-05-15 06:12:53 UTC) #28
dcheng
LGTM
3 years, 7 months ago (2017-05-15 06:15:44 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2872563002/40001
3 years, 7 months ago (2017-05-15 08:34:08 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/426377)
3 years, 7 months ago (2017-05-15 09:51:50 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2872563002/40001
3 years, 7 months ago (2017-05-15 14:27:46 UTC) #35
commit-bot: I haz the power
3 years, 7 months ago (2017-05-15 16:13:35 UTC) #38
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/d9b1d7c05d1d18606bad0a0ebfb7...

Powered by Google App Engine
This is Rietveld 408576698