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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 2937553002: Create Mojo Struct for user information used in login/lock screen. (Closed)
Patch Set: rebase 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 | « chrome/browser/ui/webui/signin/user_manager_screen_handler.h ('k') | components/proximity_auth/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index d380183b706f6b7010ac1f64477c546dc6c5614e..8ccb6082b663362b3dbba42074bda21cae2b0183 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -350,24 +350,25 @@ void UserManagerScreenHandler::EnableInput() {
void UserManagerScreenHandler::SetAuthType(
const AccountId& account_id,
- proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type,
+ proximity_auth::mojom::AuthType auth_type,
const base::string16& auth_value) {
if (GetAuthType(account_id) ==
- proximity_auth::ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD)
+ proximity_auth::mojom::AuthType::FORCE_OFFLINE_PASSWORD) {
return;
+ }
user_auth_type_map_[account_id.GetUserEmail()] = auth_type;
web_ui()->CallJavascriptFunctionUnsafe(
"login.AccountPickerScreen.setAuthType",
- base::Value(account_id.GetUserEmail()), base::Value(auth_type),
- base::Value(auth_value));
+ base::Value(account_id.GetUserEmail()),
+ base::Value(static_cast<int>(auth_type)), base::Value(auth_value));
}
-proximity_auth::ScreenlockBridge::LockHandler::AuthType
-UserManagerScreenHandler::GetAuthType(const AccountId& account_id) const {
+proximity_auth::mojom::AuthType UserManagerScreenHandler::GetAuthType(
+ const AccountId& account_id) const {
const auto it = user_auth_type_map_.find(account_id.GetUserEmail());
if (it == user_auth_type_map_.end())
- return proximity_auth::ScreenlockBridge::LockHandler::OFFLINE_PASSWORD;
+ return proximity_auth::mojom::AuthType::OFFLINE_PASSWORD;
return it->second;
}
@@ -581,10 +582,9 @@ void UserManagerScreenHandler::HandleHardlockUserPod(
std::string email;
CHECK(args->GetString(0, &email));
const AccountId account_id = AccountId::FromUserEmail(email);
- SetAuthType(
- account_id,
- proximity_auth::ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD,
- base::string16());
+ SetAuthType(account_id,
+ proximity_auth::mojom::AuthType::FORCE_OFFLINE_PASSWORD,
+ base::string16());
HideUserPodCustomIcon(account_id);
}
« no previous file with comments | « chrome/browser/ui/webui/signin/user_manager_screen_handler.h ('k') | components/proximity_auth/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698