| Index: chrome/browser/chromeos/login/user.cc
|
| diff --git a/chrome/browser/chromeos/login/user.cc b/chrome/browser/chromeos/login/user.cc
|
| index 835b0bd0693debacec38b64899d02a3e88d79214..da797c362de6f8e9208458fed64b6148c631495d 100644
|
| --- a/chrome/browser/chromeos/login/user.cc
|
| +++ b/chrome/browser/chromeos/login/user.cc
|
| @@ -47,6 +47,7 @@ void User::SetImage(const UserImage& user_image, int image_index) {
|
| user_image_ = user_image;
|
| image_index_ = image_index;
|
| image_is_stub_ = false;
|
| + DCHECK(HasDefaultImage() || user_image.has_raw_image());
|
| }
|
|
|
| void User::SetImageURL(const GURL& image_url) {
|
| @@ -70,6 +71,10 @@ std::string User::GetAccountName(bool use_display_email) const {
|
| return GetUserName(email_);
|
| }
|
|
|
| +bool User::HasDefaultImage() const {
|
| + return image_index_ >= 0 && image_index_ < kDefaultImagesCount;
|
| +}
|
| +
|
| string16 User::GetDisplayName() const {
|
| // Fallback to the email account name in case display name haven't been set.
|
| return display_name_.empty() ?
|
|
|