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

Unified Diff: ash/session/session_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
« no previous file with comments | « ash/session/session_controller.h ('k') | ash/shelf/app_list_shelf_item_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/session/session_controller.cc
diff --git a/ash/session/session_controller.cc b/ash/session/session_controller.cc
index a4edf2dbaa6627e03a1d2e76f38ef522fe58744f..82f5a6c5cf8c11c88a73f778c1082481080a501a 100644
--- a/ash/session/session_controller.cc
+++ b/ash/session/session_controller.cc
@@ -5,6 +5,7 @@
#include "ash/session/session_controller.h"
#include <algorithm>
+#include <utility>
#include "ash/session/session_observer.h"
#include "ash/shell.h"
@@ -239,9 +240,9 @@ void SessionController::SetUserSessionOrder(
}
}
-void SessionController::StartLock(const StartLockCallback& callback) {
+void SessionController::StartLock(StartLockCallback callback) {
DCHECK(start_lock_callback_.is_null());
- start_lock_callback_ = callback;
+ start_lock_callback_ = std::move(callback);
LockStateController* const lock_state_controller =
Shell::Get()->lock_state_controller();
@@ -257,12 +258,13 @@ void SessionController::NotifyChromeLockAnimationsComplete() {
}
void SessionController::RunUnlockAnimation(
- const RunUnlockAnimationCallback& callback) {
+ RunUnlockAnimationCallback callback) {
is_unlocking_ = true;
// Shell could have no instance in tests.
if (Shell::HasInstance())
- Shell::Get()->lock_state_controller()->OnLockScreenHide(callback);
+ Shell::Get()->lock_state_controller()->OnLockScreenHide(
+ std::move(callback));
}
void SessionController::NotifyChromeTerminating() {
« no previous file with comments | « ash/session/session_controller.h ('k') | ash/shelf/app_list_shelf_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698