Chromium Code Reviews| 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..b8a7fa1a0685e1664d08cb92049126d5e2c2ef62 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,38 @@ 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()); |
| + ; |
|
oshima
2015/11/13 15:45:10
remove this
Alexander Alekseev
2015/11/13 16:04:11
Done.
|
| + delegate_->AuthenticateManager(manager_account_id.GetUserEmail(), |
| + manager_password); |
| } |
| // TODO(antrim) : this is an explicit code duplications with UserImageScreen. |