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

Issue 2871523002: Use OnceCallback on Mojo interfaces in //content (Closed)

Created:
3 years, 7 months ago by tzik
Modified:
3 years, 7 months ago
Reviewers:
kinuko
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, scheib+watch_chromium.org, ortuno+watch_chromium.org, kinuko+watch, jsbell+serviceworker_chromium.org, tzik, jam, abarth-chromium, darin-cc_chromium.org, einbinder+watch-test-runner_chromium.org, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, nhiroki, jochen+watch_chromium.org, michaeln, shimazu+serviceworker_chromium.org, mlamouri+watch-test-runner_chromium.org, serviceworker-reviews, Aaron Boodman, kinuko+serviceworker, horo+watch_chromium.org, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use OnceCallback on Mojo interfaces in //content 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 //content 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/2871523002 Cr-Commit-Position: refs/heads/master@{#470344} Committed: https://chromium.googlesource.com/chromium/src/+/edb20606028c861740ec4135481db9e214de5be6

Patch Set 1 #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -49 lines) Patch
M content/browser/browser_associated_interface_unittest.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 chunks +8 lines, -9 lines 0 comments Download
M content/browser/webui/web_ui_mojo_browsertest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M content/public/test/test_service.h View 1 chunk +5 lines, -5 lines 0 comments Download
M content/public/test/test_service.cc View 1 chunk +8 lines, -10 lines 0 comments Download
M content/shell/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/shell/renderer/shell_content_renderer_client.cc View 2 chunks +6 lines, -8 lines 0 comments Download
M content/shell/utility/shell_content_utility_client.cc View 2 chunks +8 lines, -8 lines 0 comments Download
M content/test/BUILD.gn View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (14 generated)
tzik
PTAL
3 years, 7 months ago (2017-05-09 10:27:16 UTC) #10
kinuko
lgtm
3 years, 7 months ago (2017-05-09 11:06:16 UTC) #11
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/2871523002/20001
3 years, 7 months ago (2017-05-09 14:15:48 UTC) #15
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 15:42:15 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/edb20606028c861740ec4135481d...

Powered by Google App Engine
This is Rietveld 408576698