| Index: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| index 815fa789ada0bd408a9cf68ca0b911f3d5b08416..c17874ad0fd92b2fef5cbe39d098778e4d2b9a7f 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
|
| @@ -62,15 +62,15 @@ bool IsSettingShared(const std::string& pref) {
|
|
|
| // Creates a user info dictionary to be stored in the |ListValue| that is
|
| // passed to Javascript for the |kAccountsPrefUsers| preference.
|
| -base::DictionaryValue* CreateUserInfo(const std::string& username,
|
| +base::DictionaryValue* CreateUserInfo(const user_manager::UserID& user_id,
|
| const std::string& display_email,
|
| const std::string& display_name) {
|
| base::DictionaryValue* user_dict = new base::DictionaryValue;
|
| - user_dict->SetString("username", username);
|
| + user_dict->SetString("username", user_id.GetUserEmail());
|
| user_dict->SetString("name", display_email);
|
| user_dict->SetString("email", display_name);
|
|
|
| - bool is_owner = user_manager::UserManager::Get()->GetOwnerEmail() == username;
|
| + bool is_owner = user_manager::UserManager::Get()->GetOwnerID() == user_id;
|
| user_dict->SetBoolean("owner", is_owner);
|
| return user_dict;
|
| }
|
| @@ -87,10 +87,11 @@ base::Value* CreateUsersWhitelist(const base::Value *pref_value) {
|
| i != list_value->end(); ++i) {
|
| std::string email;
|
| if ((*i)->GetAsString(&email)) {
|
| + const user_manager::UserID user_id(user_manager::UserID::FromUserEmail(email));
|
| // Translate email to the display email.
|
| - std::string display_email = user_manager->GetUserDisplayEmail(email);
|
| + std::string display_email = user_manager->GetUserDisplayEmail(user_id);
|
| // TODO(ivankr): fetch display name for existing users.
|
| - user_list->Append(CreateUserInfo(email, display_email, std::string()));
|
| + user_list->Append(CreateUserInfo(user_id, display_email, std::string()));
|
| }
|
| }
|
| return user_list;
|
| @@ -101,7 +102,7 @@ bool IsSecondaryUser(Profile* profile) {
|
| user_manager::UserManager* user_manager = user_manager::UserManager::Get();
|
| const user_manager::User* user =
|
| ProfileHelper::Get()->GetUserByProfile(profile);
|
| - return user && user->email() != user_manager->GetPrimaryUser()->email();
|
| + return user && user->GetUserID() != user_manager->GetPrimaryUser()->GetUserID();
|
| }
|
|
|
| const char kSelectNetworkMessage[] = "selectNetwork";
|
| @@ -325,7 +326,7 @@ void CoreChromeOSOptionsHandler::GetLocalizedValues(
|
| user_manager::UserManager* user_manager = user_manager::UserManager::Get();
|
|
|
| if (IsSecondaryUser(profile)) {
|
| - const std::string& primary_email = user_manager->GetPrimaryUser()->email();
|
| + const std::string& primary_email = user_manager->GetPrimaryUser()->GetUserID().GetUserEmail();
|
|
|
| // Set secondaryUser to show the shared icon by the network section header.
|
| localized_strings->SetBoolean("secondaryUser", true);
|
| @@ -362,7 +363,7 @@ void CoreChromeOSOptionsHandler::GetLocalizedValues(
|
| localized_strings->SetString("controlledSettingOwner",
|
| l10n_util::GetStringFUTF16(
|
| IDS_OPTIONS_CONTROLLED_SETTING_OWNER,
|
| - base::ASCIIToUTF16(user_manager->GetOwnerEmail())));
|
| + base::ASCIIToUTF16(user_manager->GetOwnerID().GetUserEmail())));
|
| }
|
| }
|
|
|
|
|