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

Issue 2864283002: Use OnceCallback on Mojo interfaces in //components/leak_detector (Closed)

Created:
3 years, 7 months ago by tzik
Modified:
3 years, 7 months ago
Reviewers:
Will Harris
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use OnceCallback on Mojo interfaces in //components/leak_detector 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 //components/leak_detector 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/2864283002 Cr-Commit-Position: refs/heads/master@{#474330} Committed: https://chromium.googlesource.com/chromium/src/+/dc5014660fb72764d23948e947b7b93ffcd49e9a

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -7 lines) Patch
M chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc View 1 3 chunks +4 lines, -2 lines 0 comments Download
M components/metrics/leak_detector/BUILD.gn View 2 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (23 generated)
tzik
PTAL
3 years, 7 months ago (2017-05-09 11:07:22 UTC) #14
Will Harris
lgtm
3 years, 7 months ago (2017-05-21 01:04:07 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/2864283002/40001
3 years, 7 months ago (2017-05-24 15:41:22 UTC) #24
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 17:00:14 UTC) #27
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/dc5014660fb72764d23948e947b7...

Powered by Google App Engine
This is Rietveld 408576698