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

Unified Diff: ash/system/user/tray_user.cc

Issue 10389193: Add user_info_ NULL check in case of guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index f431980d03a8b6b23ff2342fdd4329d7aff8e58a..07fb61ef6b22de5db24793049fe0d3a4ae700eda 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -224,7 +224,7 @@ class UserView : public views::View,
return;
container_->SetBoundsRect(gfx::Rect(size()));
- if (signout_) {
+ if (signout_ && user_info_) {
gfx::Rect signout_bounds(signout_->GetPreferredSize());
signout_bounds = bounds().Center(signout_bounds.size());
signout_bounds.set_x(width() - signout_bounds.width() -
@@ -234,7 +234,9 @@ class UserView : public views::View,
gfx::Rect usercard_bounds(user_info_->GetPreferredSize());
usercard_bounds.set_width(signout_bounds.x());
user_info_->SetBoundsRect(usercard_bounds);
- } else {
+ } else if (signout_) {
+ signout_->SetBoundsRect(gfx::Rect(size()));
+ } else if (user_info_) {
user_info_->SetBoundsRect(gfx::Rect(size()));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698