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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_login_handler.cc

Issue 8822024: Profile/user menu on NTP should look more clickable? (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated changeset, with suggestions from sail and estade Created 9 years 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
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698