|
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
Total comments: 6
|
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
|
Total messages: 24 (18 generated)
|