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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.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
Index: chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
index 84e495a5b1b5e9c7b37848f49ab4bc89513a1818..6f6bfb7a4f07a6c27efdccf5922a245de6ea3bc1 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.h"
+#include <utility>
+
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
@@ -37,20 +39,20 @@ void ArcAppWindowLauncherItemController::ItemSelected(
std::unique_ptr<ui::Event> event,
int64_t display_id,
ash::ShelfLaunchSource source,
- const ItemSelectedCallback& callback) {
+ ItemSelectedCallback callback) {
if (window_count()) {
AppWindowLauncherItemController::ItemSelected(std::move(event), display_id,
- source, callback);
+ source, std::move(callback));
return;
}
if (task_ids_.empty()) {
NOTREACHED();
- callback.Run(ash::SHELF_ACTION_NONE, base::nullopt);
+ std::move(callback).Run(ash::SHELF_ACTION_NONE, base::nullopt);
return;
}
arc::SetTaskActive(*task_ids_.begin());
- callback.Run(ash::SHELF_ACTION_NEW_WINDOW_CREATED, base::nullopt);
+ std::move(callback).Run(ash::SHELF_ACTION_NEW_WINDOW_CREATED, base::nullopt);
}
void ArcAppWindowLauncherItemController::ExecuteCommand(uint32_t command_id,

Powered by Google App Engine
This is Rietveld 408576698