Chromeos: Only set email text if there is a logged in user

35 tests fail because we are setting the localized text for the string userEmail to the logged in email for a user, but in the test environment there is no logged in user.

BUG=105049
TEST=Various browser tests, including DownloadTest.ChromeURLAfterDownload

Review URL: http://codereview.chromium.org/8624004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111026 0039d316-1c4b-4281-b951-d872f2087c98
parent 3dd3f298
...@@ -202,8 +202,10 @@ void PersonalOptionsHandler::GetLocalizedValues( ...@@ -202,8 +202,10 @@ void PersonalOptionsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX));
localized_strings->SetString("changePicture", localized_strings->SetString("changePicture",
l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE)); l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE));
localized_strings->SetString("userEmail", if (chromeos::UserManager::Get()->user_is_logged_in()) {
chromeos::UserManager::Get()->logged_in_user().email()); localized_strings->SetString("userEmail",
chromeos::UserManager::Get()->logged_in_user().email());
}
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment