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

Unified Diff: chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc

Issue 1440583002: This CL replaces e-mail with AccountId on user selection screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 5 years, 1 month 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/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc
index c672a2410c7a5579461e73013af56f35b32a5655..5a6cb430f3ac177c8a6eaeea7af66a0ac3a27e43 100644
--- a/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc
@@ -18,6 +18,7 @@
#include "chrome/grit/generated_resources.h"
#include "chromeos/audio/chromeos_sounds.h"
#include "components/login/localized_values_builder.h"
+#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user_manager.h"
#include "components/user_manager/user_type.h"
#include "google_apis/gaia/gaia_auth_util.h"
@@ -298,14 +299,14 @@ void SupervisedUserCreationScreenHandler::
}
void SupervisedUserCreationScreenHandler::HandleManagerSelected(
- const std::string& manager_id) {
+ const AccountId& manager_id) {
if (!delegate_)
return;
- WallpaperManager::Get()->SetUserWallpaperNow(manager_id);
+ WallpaperManager::Get()->SetUserWallpaperNow(manager_id.GetUserEmail());
}
void SupervisedUserCreationScreenHandler::HandleImportUserSelected(
- const std::string& user_id) {
+ const AccountId& account_id) {
if (!delegate_)
return;
}
@@ -368,35 +369,37 @@ void SupervisedUserCreationScreenHandler::HandleCreateSupervisedUser(
}
void SupervisedUserCreationScreenHandler::HandleImportSupervisedUser(
- const std::string& user_id) {
+ const AccountId& account_id) {
if (!delegate_)
return;
ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
IDS_CREATE_SUPERVISED_USER_CREATION_CREATION_PROGRESS_MESSAGE));
- delegate_->ImportSupervisedUser(user_id);
+ delegate_->ImportSupervisedUser(account_id.GetUserEmail());
}
void SupervisedUserCreationScreenHandler::
- HandleImportSupervisedUserWithPassword(
- const std::string& user_id,
- const std::string& password) {
+ HandleImportSupervisedUserWithPassword(const AccountId& account_id,
+ const std::string& password) {
if (!delegate_)
return;
ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
IDS_CREATE_SUPERVISED_USER_CREATION_CREATION_PROGRESS_MESSAGE));
- delegate_->ImportSupervisedUserWithPassword(user_id, password);
+ delegate_->ImportSupervisedUserWithPassword(account_id.GetUserEmail(),
+ password);
}
void SupervisedUserCreationScreenHandler::HandleAuthenticateManager(
- const std::string& raw_manager_username,
+ const AccountId& manager_raw_account_id,
const std::string& manager_password) {
- const std::string manager_username =
- gaia::SanitizeEmail(raw_manager_username);
- delegate_->AuthenticateManager(manager_username, manager_password);
+ const AccountId manager_account_id = AccountId::FromUserEmailGaiaId(
+ gaia::SanitizeEmail(manager_raw_account_id.GetUserEmail()),
+ manager_raw_account_id.GetGaiaId());
+ delegate_->AuthenticateManager(manager_account_id.GetUserEmail(),
+ manager_password);
}
// TODO(antrim) : this is an explicit code duplications with UserImageScreen.

Powered by Google App Engine
This is Rietveld 408576698