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

Unified Diff: ui/views/view_text_utils.cc

Issue 11377133: Customize user details in ash system bubble for public account mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« ash/system/user/tray_user.cc ('K') | « chrome/browser/ui/chrome_pages.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_text_utils.cc
diff --git a/ui/views/view_text_utils.cc b/ui/views/view_text_utils.cc
index 0ea27d7624d9c35c09ab5a3af10e7197caa12e98..cdc26293da99ce4ad32eca2dab0954462a6958f4 100644
--- a/ui/views/view_text_utils.cc
+++ b/ui/views/view_text_utils.cc
@@ -26,7 +26,7 @@ void DrawTextAndPositionUrl(gfx::Canvas* canvas,
bool text_direction_is_rtl,
const gfx::Rect& bounds,
const gfx::Font& font) {
- DCHECK(canvas && position);
+ DCHECK(position);
// The |text| parameter is potentially a mix of LTR and RTL "runs," where
// a run is a sequence of words that share the same directionality. We
@@ -128,8 +128,10 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
int y = position->height() + bounds.y();
// Draw the text on the screen (mirrored, if RTL run).
- canvas->DrawStringInt(word, font, label->enabled_color(), x, y, w,
- font.GetHeight(), flags);
+ if (canvas) {
+ canvas->DrawStringInt(word, font, label->enabled_color(), x, y, w,
+ font.GetHeight(), flags);
+ }
if (!word.empty() && word[word.size() - 1] == '\x0a') {
// When we come across '\n', we move to the beginning of the next line.
« ash/system/user/tray_user.cc ('K') | « chrome/browser/ui/chrome_pages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698