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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.h

Issue 2896093003: cros: Make sure views-based lock screen is destroyed after it is dismissed. (Closed)
Patch Set: Address comments Created 3 years, 6 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/chromeos/login/lock/screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.h b/chrome/browser/chromeos/login/lock/screen_locker.h
index dba07eb44bdd26fa11b408c417e09a9f89f03d63..558c018d7cabccdbf36250a7c862c70c20c596d1 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/screen_locker.h
@@ -101,6 +101,8 @@ class ScreenLocker : public AuthStatusConsumer,
DISALLOW_COPY_AND_ASSIGN(Delegate);
};
+ using AuthenticateCallback = base::OnceCallback<void(bool auth_success)>;
+
explicit ScreenLocker(const user_manager::UserList& users);
// Returns the default instance if it has been created.
@@ -126,7 +128,8 @@ class ScreenLocker : public AuthStatusConsumer,
void UnlockOnLoginSuccess();
// Authenticates the user with given |user_context|.
- void Authenticate(const UserContext& user_context);
+ void Authenticate(const UserContext& user_context,
+ AuthenticateCallback callback);
// Close message bubble to clear error messages.
void ClearErrors();
@@ -268,6 +271,9 @@ class ScreenLocker : public AuthStatusConsumer,
// Type of the last unlock attempt.
UnlockType unlock_attempt_type_ = AUTH_PASSWORD;
+ // Callback to run, if any, when authentication is done.
+ AuthenticateCallback on_auth_complete_;
+
// Copy of parameters passed to last call of OnLoginSuccess for usage in
// UnlockOnLoginSuccess().
std::unique_ptr<AuthenticationParametersCapture> authentication_capture_;

Powered by Google App Engine
This is Rietveld 408576698