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

Unified Diff: ash/login/mock_lock_screen_client.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
« no previous file with comments | « ash/login/lock_screen_controller_unittest.cc ('k') | ash/login/mock_lock_screen_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/login/mock_lock_screen_client.h
diff --git a/ash/login/mock_lock_screen_client.h b/ash/login/mock_lock_screen_client.h
index 3900dafaa3542b0ca7490ef0cf396488b0158ff4..60bbac1c958d7b13189707f67b0547ae0a484314 100644
--- a/ash/login/mock_lock_screen_client.h
+++ b/ash/login/mock_lock_screen_client.h
@@ -18,16 +18,29 @@ class MockLockScreenClient : public mojom::LockScreenClient {
mojom::LockScreenClientPtr CreateInterfacePtrAndBind();
- // mojom::LockScreenClient:
- MOCK_METHOD3(AuthenticateUser,
+ MOCK_METHOD4(AuthenticateUser_,
void(const AccountId& account_id,
const std::string& password,
- bool authenticated_by_pin));
+ bool authenticated_by_pin,
+ AuthenticateUserCallback& callback));
+
+ // Set the result that should be passed to |callback| in |AuthenticateUser|.
+ void set_authenticate_user_callback_result(bool value) {
+ authenticate_user_callback_result_ = value;
+ }
+
+ // mojom::LockScreenClient:
+ void AuthenticateUser(const AccountId& account_id,
+ const std::string& password,
+ bool authenticated_by_pin,
+ AuthenticateUserCallback callback) override;
MOCK_METHOD1(AttemptUnlock, void(const AccountId& account_id));
MOCK_METHOD1(HardlockPod, void(const AccountId& account_id));
MOCK_METHOD1(RecordClickOnLockIcon, void(const AccountId& account_id));
private:
+ bool authenticate_user_callback_result_ = true;
+
mojo::Binding<ash::mojom::LockScreenClient> binding_;
DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient);
@@ -38,4 +51,4 @@ std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient();
} // namespace ash
-#endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
+#endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
« no previous file with comments | « ash/login/lock_screen_controller_unittest.cc ('k') | ash/login/mock_lock_screen_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698