Index: chrome/browser/ui/webui/ntp/ntp_login_handler.cc |
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc |
index dc7f087bd1a15199124028eac77cb0486d5d65d5..ac2988c2f4823a4bbfcf80c2c0ae5035b0f8eab4 100644 |
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc |
@@ -36,6 +36,7 @@ |
#include "content/public/browser/notification_service.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
+#include "net/base/escape.h" |
#include "skia/ext/image_operations.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/gfx/canvas_skia.h" |
@@ -184,7 +185,10 @@ void NTPLoginHandler::UpdateLogin() { |
// case. In the multi-profile case the profile picture is visible in the |
// title bar and the full name can be ambiguous. |
if (cache.GetNumberOfProfiles() == 1) { |
- header = cache.GetGAIANameOfProfileAtIndex(profile_index); |
+ string16 name = cache.GetGAIANameOfProfileAtIndex(profile_index); |
+ header = ASCIIToUTF16("<span class='profile-name'>") + |
+ net::EscapeForHTML(name) + |
sail
2011/12/06 23:00:57
Ahh, I didn't know about EscapeForHTML(). Can you
Tyler Breisacher (Chromium)
2011/12/06 23:17:48
I figured it's unlikely someone would say their na
|
+ ASCIIToUTF16("</span>"); |
const gfx::Image* image = |
cache.GetGAIAPictureOfProfileAtIndex(profile_index); |
if (image) |