| Index: chrome/browser/profiles/avatar_menu_model.cc
|
| diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
|
| index de6b9043f4133f5a55e2fb164bba724eb40e6bc2..a1f988a3376c88d98649158150b048ae1e5ae1b9 100644
|
| --- a/chrome/browser/profiles/avatar_menu_model.cc
|
| +++ b/chrome/browser/profiles/avatar_menu_model.cc
|
| @@ -141,21 +141,10 @@ AvatarMenuModel::~AvatarMenuModel() {
|
| ClearMenu();
|
| }
|
|
|
| -AvatarMenuModel::Item::Item(size_t model_index, const gfx::Image& icon)
|
| - : icon(icon),
|
| - active(false),
|
| - signed_in(false),
|
| - signin_required(false),
|
| - model_index(model_index) {
|
| -}
|
| -
|
| -AvatarMenuModel::Item::~Item() {
|
| -}
|
| -
|
| void AvatarMenuModel::SwitchToProfile(size_t index, bool always_create) {
|
| DCHECK(profiles::IsMultipleProfilesEnabled() ||
|
| index == GetActiveProfileIndex());
|
| - const Item& item = GetItemAt(index);
|
| + const AvatarMenuItemModel& item = GetItemAt(index);
|
| base::FilePath path =
|
| profile_info_->GetPathOfProfileAtIndex(item.model_index);
|
|
|
| @@ -193,7 +182,7 @@ void AvatarMenuModel::AddNewProfile(ProfileMetrics::ProfileAdd type) {
|
| }
|
|
|
| base::FilePath AvatarMenuModel::GetProfilePath(size_t index) {
|
| - const Item& item = GetItemAt(index);
|
| + const AvatarMenuItemModel& item = GetItemAt(index);
|
| return profile_info_->GetPathOfProfileAtIndex(item.model_index);
|
| }
|
|
|
| @@ -232,7 +221,7 @@ size_t AvatarMenuModel::GetActiveProfileIndex() {
|
| return index;
|
| }
|
|
|
| -const AvatarMenuModel::Item& AvatarMenuModel::GetItemAt(size_t index) {
|
| +const AvatarMenuItemModel& AvatarMenuModel::GetItemAt(size_t index) {
|
| DCHECK_LT(index, items_.size());
|
| return *items_[index];
|
| }
|
| @@ -313,7 +302,7 @@ void AvatarMenuModel::RebuildMenu() {
|
| icon = profiles::GetAvatarIconForMenu(icon, is_gaia_picture);
|
| }
|
|
|
| - Item* item = new Item(i, icon);
|
| + AvatarMenuItemModel* item = new AvatarMenuItemModel(i, icon);
|
| item->name = profile_info_->GetNameOfProfileAtIndex(i);
|
| item->sync_state = profile_info_->GetUserNameOfProfileAtIndex(i);
|
| item->signed_in = !item->sync_state.empty();
|
|
|