Add current time parameter to Parent Access Code validation method
Set date and time dialog need to use to user's input time to validate
the code.
Bug: 987824
Change-Id: I1f375ba01b7f7e74fcf45ea05a00509f4b08e6d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729572
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Aga Wronska <agawronska@chromium.org>
Commit-Queue: Henrique Grandinetti <hgrandinetti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685978}
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index 38f7714a..1f3a490 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -199,11 +199,12 @@
bool LoginScreenController::ValidateParentAccessCode(
const AccountId& account_id,
- const std::string& code) {
+ const std::string& code,
+ base::Time validation_time) {
if (!client_)
return false;
- return client_->ValidateParentAccessCode(account_id, code);
+ return client_->ValidateParentAccessCode(account_id, code, validation_time);
}
void LoginScreenController::HardlockPod(const AccountId& account_id) {
@@ -370,11 +371,12 @@
void LoginScreenController::ShowParentAccessWidget(
const AccountId& child_account_id,
- base::RepeatingCallback<void(bool success)> callback,
+ OnParentAccessWidgetFinished callback,
ParentAccessRequestReason reason,
- bool extra_dimmer) {
+ bool extra_dimmer,
+ base::Time validation_time) {
parent_access_widget_ = std::make_unique<ash::ParentAccessWidget>(
- child_account_id, callback, reason, extra_dimmer);
+ child_account_id, callback, reason, extra_dimmer, validation_time);
}
void LoginScreenController::SetAllowLoginAsGuest(bool allow_guest) {