| Index: ash/common/shelf/shelf_view.cc
|
| diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
|
| index f85e154d9afd5d624384a0ff9b3e426de97b7681..5a6bfaa6263e7e25ce84b25744ba31734f18d7d1 100644
|
| --- a/ash/common/shelf/shelf_view.cc
|
| +++ b/ash/common/shelf/shelf_view.cc
|
| @@ -1351,12 +1351,11 @@ ShelfView::RemovableState ShelfView::RemovableByRipOff(int index) const {
|
| if (type == TYPE_APP_LIST || type == TYPE_DIALOG)
|
| return NOT_REMOVABLE;
|
|
|
| - std::string app_id = delegate_->GetAppIDForShelfID(model_->items()[index].id);
|
| - ShelfItemDelegate* item_delegate =
|
| - model_->GetShelfItemDelegate(model_->items()[index].id);
|
| - if (!item_delegate->CanPin())
|
| + if (model_->items()[index].pinned_by_policy)
|
| return NOT_REMOVABLE;
|
| +
|
| // Note: Only pinned app shortcuts can be removed!
|
| + std::string app_id = delegate_->GetAppIDForShelfID(model_->items()[index].id);
|
| return (type == TYPE_APP_SHORTCUT && delegate_->IsAppPinned(app_id))
|
| ? REMOVABLE
|
| : DRAGGABLE;
|
|
|