| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
|
| index 5f272d6c4edffb2035868cf40a4b34c4621d6cd4..045b01a9d2877720e16dcade1608d86a6c64e609 100644
|
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
|
| @@ -397,13 +397,6 @@ void ChromeLauncherControllerImpl::TogglePinned(ash::ShelfID id) {
|
| Pin(id);
|
| }
|
|
|
| -bool ChromeLauncherControllerImpl::IsPinnable(ash::ShelfID id) const {
|
| - const ash::ShelfItem* item = GetItem(id);
|
| - return (item && (item->type == ash::TYPE_APP_SHORTCUT ||
|
| - item->type == ash::TYPE_APP) &&
|
| - model_->GetShelfItemDelegate(id)->CanPin());
|
| -}
|
| -
|
| void ChromeLauncherControllerImpl::LockV1AppWithID(const std::string& app_id) {
|
| ash::ShelfID id = GetShelfIDForAppID(app_id);
|
| if (id == ash::kInvalidShelfID) {
|
| @@ -1209,6 +1202,20 @@ void ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref() {
|
| LauncherItemClosed(item.id);
|
| }
|
| }
|
| +
|
| + UpdatePolicyPinnedAppsFromPrefs();
|
| +}
|
| +
|
| +void ChromeLauncherControllerImpl::UpdatePolicyPinnedAppsFromPrefs() {
|
| + for (int index = 0; index < model_->item_count(); index++) {
|
| + ash::ShelfItem item = model_->items()[index];
|
| + const bool pinned_by_policy = GetPinnableForAppID(item.app_id, profile()) ==
|
| + AppListControllerDelegate::PIN_FIXED;
|
| + if (item.pinned_by_policy != pinned_by_policy) {
|
| + item.pinned_by_policy = pinned_by_policy;
|
| + model_->Set(index, item);
|
| + }
|
| + }
|
| }
|
|
|
| void ChromeLauncherControllerImpl::SetVirtualKeyboardBehaviorFromPrefs() {
|
|
|