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

Unified Diff: ash/shelf/shelf_view_unittest.cc

Issue 2867673004: Use OnceCallback on Mojo interfaces in //ash (Closed)
Patch Set: count -> container_count Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/app_list_shelf_item_delegate.cc ('k') | ash/shelf/shelf_window_watcher_item_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view_unittest.cc
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index 7dd572cf1a72a6dcbf045d4c2ead4a2edb44f363..016dded06ca146b75dc1952097035eeff2e94fdf 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -154,9 +154,9 @@ class ShelfItemSelectionTracker : public ShelfItemDelegate {
void ItemSelected(std::unique_ptr<ui::Event> event,
int64_t display_id,
ShelfLaunchSource source,
- const ItemSelectedCallback& callback) override {
+ ItemSelectedCallback callback) override {
item_selected_count_++;
- callback.Run(item_selected_action_, base::nullopt);
+ std::move(callback).Run(item_selected_action_, base::nullopt);
}
void ExecuteCommand(uint32_t command_id, int32_t event_flags) override {}
void Close() override {}
@@ -2016,12 +2016,12 @@ class ListMenuShelfItemDelegate : public ShelfItemDelegate {
void ItemSelected(std::unique_ptr<ui::Event> event,
int64_t display_id,
ShelfLaunchSource source,
- const ItemSelectedCallback& callback) override {
+ ItemSelectedCallback callback) override {
// Two items are needed to show a menu; the data in the items is not tested.
std::vector<mojom::MenuItemPtr> items;
items.push_back(mojom::MenuItem::New());
items.push_back(mojom::MenuItem::New());
- callback.Run(SHELF_ACTION_NONE, std::move(items));
+ std::move(callback).Run(SHELF_ACTION_NONE, std::move(items));
}
void ExecuteCommand(uint32_t command_id, int32_t event_flags) override {}
void Close() override {}
« no previous file with comments | « ash/shelf/app_list_shelf_item_delegate.cc ('k') | ash/shelf/shelf_window_watcher_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698