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

Issue 2867673004: Use OnceCallback on Mojo interfaces in //ash (Closed)

Created:
3 years, 7 months ago by tzik
Modified:
3 years, 7 months ago
Reviewers:
James Cook, oshima
CC:
chromium-reviews, kalyank, sadrul
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use OnceCallback on Mojo interfaces in //ash 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 //ash 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. Specifically to //ash, the change in //ash/test/test_session_state_animator.cc is non-trivial. This CL adds a BarrierClosure here. BUG=714018 Review-Url: https://codereview.chromium.org/2867673004 Cr-Commit-Position: refs/heads/master@{#470902} Committed: https://chromium.googlesource.com/chromium/src/+/5788c3d4d26446572f032baa70ba82fdf39e789d

Patch Set 1 #

Patch Set 2 : rebase. +#include #

Total comments: 6

Patch Set 3 : rebase #

Patch Set 4 : count -> container_count #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -107 lines) Patch
M ash/public/interfaces/BUILD.gn View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M ash/session/session_controller.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/session/session_controller.cc View 1 3 chunks +6 lines, -4 lines 0 comments Download
M ash/shelf/app_list_shelf_item_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/shelf/app_list_shelf_item_delegate.cc View 1 2 chunks +7 lines, -6 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M ash/shelf/shelf_window_watcher_item_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/shelf/shelf_window_watcher_item_delegate.cc View 1 2 chunks +7 lines, -5 lines 0 comments Download
M ash/shell/window_watcher_shelf_item_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/shell/window_watcher_shelf_item_delegate.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M ash/system/locale/locale_notification_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/system/locale/locale_notification_controller.cc View 6 chunks +10 lines, -14 lines 0 comments Download
M ash/test/test_session_state_animator.h View 1 chunk +3 lines, -2 lines 0 comments Download
M ash/test/test_session_state_animator.cc View 1 2 3 3 chunks +21 lines, -7 lines 0 comments Download
M ash/wm/lock_state_controller.h View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/lock_state_controller.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M ash/wm/session_state_animator.h View 3 chunks +5 lines, -4 lines 0 comments Download
M ash/wm/session_state_animator.cc View 1 3 chunks +5 lines, -3 lines 0 comments Download
M ash/wm/session_state_animator_impl.h View 1 chunk +3 lines, -2 lines 0 comments Download
M ash/wm/session_state_animator_impl.cc View 1 4 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc View 1 4 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc View 1 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc View 1 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc View 1 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc View 1 2 4 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/session_controller_client_unittest.cc View 1 2 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
tzik
PTAL
3 years, 7 months ago (2017-05-09 05:36:33 UTC) #10
oshima
-> jamescook@
3 years, 7 months ago (2017-05-09 06:15:31 UTC) #12
James Cook
LGTM with nits https://codereview.chromium.org/2867673004/diff/20001/ash/shelf/app_list_shelf_item_delegate.cc File ash/shelf/app_list_shelf_item_delegate.cc (right): https://codereview.chromium.org/2867673004/diff/20001/ash/shelf/app_list_shelf_item_delegate.cc#newcode51 ash/shelf/app_list_shelf_item_delegate.cc:51: std::move(callback).Run(SHELF_ACTION_APP_LIST_SHOWN, base::nullopt); Aside: I know this ...
3 years, 7 months ago (2017-05-09 18:30:41 UTC) #15
tzik
https://codereview.chromium.org/2867673004/diff/20001/ash/shelf/app_list_shelf_item_delegate.cc File ash/shelf/app_list_shelf_item_delegate.cc (right): https://codereview.chromium.org/2867673004/diff/20001/ash/shelf/app_list_shelf_item_delegate.cc#newcode51 ash/shelf/app_list_shelf_item_delegate.cc:51: std::move(callback).Run(SHELF_ACTION_APP_LIST_SHOWN, base::nullopt); On 2017/05/09 18:30:40, James Cook (sheriff - ...
3 years, 7 months ago (2017-05-11 08:15:21 UTC) #18
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/2867673004/60001
3 years, 7 months ago (2017-05-11 08:15:57 UTC) #21
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 10:24:31 UTC) #24
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/5788c3d4d26446572f032baa70ba...

Powered by Google App Engine
This is Rietveld 408576698