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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 2687643004: MD Settings: CrOS: Add secondary user banner (Closed)
Patch Set: Created 3 years, 10 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
Index: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index d429ad0fdee2366a0d47111b70961215dbe6a5a9..fb55a1ff7689f59fba8c5730a3127c177d938a6b 100644
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -997,11 +997,15 @@ void AddMultiProfilesStrings(content::WebUIDataSource* html_source,
const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
const user_manager::User* primary_user = user_manager->GetPrimaryUser();
- html_source->AddString("primaryUserEmail",
- primary_user->GetAccountId().GetUserEmail());
+ std::string primary_user_email = primary_user->GetAccountId().GetUserEmail();
+ html_source->AddString("primaryUserEmail", primary_user_email);
html_source->AddBoolean(
"isSecondaryUser",
user && user->GetAccountId() != primary_user->GetAccountId());
+ html_source->AddString(
+ "secondaryUserBannerText",
+ l10n_util::GetStringFUTF16(IDS_SETTINGS_SECONDARY_USER_BANNER,
+ base::ASCIIToUTF16(primary_user_email)));
dschuyler 2017/02/11 02:54:56 I believe this will be converted back to UTF8 agai
stevenjb 2017/02/13 18:28:00 It's not UTF8, this is all UTF16.
dschuyler 2017/02/13 21:37:09 Maybe I'm missing something(?). It looks like prim
stevenjb 2017/02/13 21:58:27 While you are not wrong, that seems like something
}
#endif

Powered by Google App Engine
This is Rietveld 408576698