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

Issue 2608013002: mash: Replace ShelfItemDelegate::CanPin with ShelfItem::pinned_by_policy. (Closed)

Created:
3 years, 11 months ago by msw
Modified:
3 years, 11 months ago
Reviewers:
James Cook
CC:
chromium-reviews, kalyank, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mash: Replace ShelfItemDelegate::CanPin with ShelfItem::pinned_by_policy. Remove CanPin (ash shelf item delegation back to chrome). Add a pinned_by_policy flag on the ShelfItem struct itself instead. Update flags in ChromeLauncherControllerImpl::UpdatePolicyPinnedAppsFromPrefs. (via UpdateAppLaunchersFromPref, called on changes to prefs::kPolicyPinnedLauncherApps) Inline ChromeLauncherController::IsPinnable in LauncherContextMenu. TODO: Revise the policy-pinning code to make this more efficient. BUG=557406 TEST=No changes to policy-pinned app shelf items. R=jamescook@chromium.org Committed: https://crrev.com/f4a69e95680a3af7aa01266c3036441ee795703b Cr-Commit-Position: refs/heads/master@{#441537}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Sync and rebase #

Patch Set 3 : Address comments. #

Patch Set 4 : Fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -102 lines) Patch
M ash/common/shelf/app_list_shelf_item_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M ash/common/shelf/app_list_shelf_item_delegate.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ash/common/shelf/shelf_controller.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M ash/common/shelf/shelf_item_delegate.h View 1 chunk +0 lines, -5 lines 0 comments Download
M ash/common/shelf/shelf_item_types.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ash/common/shelf/shelf_view.cc View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
M ash/common/shelf/shelf_window_watcher_item_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M ash/common/shelf/shelf_window_watcher_item_delegate.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ash/common/test/test_shelf_item_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M ash/common/test/test_shelf_item_delegate.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ash/shell/window_watcher_shelf_item_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M ash/shell/window_watcher_shelf_item_delegate.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc View 1 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc View 1 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc View 1 2 2 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.cc View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.cc View 1 2 5 chunks +5 lines, -13 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc View 1 2 3 4 chunks +13 lines, -10 lines 0 comments Download

Messages

Total messages: 25 (15 generated)
msw
Hey James, please take a look; thanks!
3 years, 11 months ago (2016-12-30 01:26:46 UTC) #6
James Cook
LGTM with nits. If pulling out the utility function in ChromeLauncherControllerImpl turns out to be ...
3 years, 11 months ago (2017-01-04 17:32:17 UTC) #7
msw
Comments addressed; please take another look, thanks! https://codereview.chromium.org/2608013002/diff/1/ash/common/shelf/shelf_item_delegate.h File ash/common/shelf/shelf_item_delegate.h (left): https://codereview.chromium.org/2608013002/diff/1/ash/common/shelf/shelf_item_delegate.h#oldcode53 ash/common/shelf/shelf_item_delegate.h:53: virtual bool ...
3 years, 11 months ago (2017-01-04 22:23:04 UTC) #10
James Cook
still lgtm assuming the test failure isn't anything important
3 years, 11 months ago (2017-01-04 23:57:08 UTC) #13
msw
On 2017/01/04 23:57:08, James Cook wrote: > still lgtm assuming the test failure isn't anything ...
3 years, 11 months ago (2017-01-05 00:27:43 UTC) #15
msw
On 2017/01/04 23:57:08, James Cook wrote: > still lgtm assuming the test failure isn't anything ...
3 years, 11 months ago (2017-01-05 00:27:44 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2608013002/60001
3 years, 11 months ago (2017-01-05 00:28:47 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
3 years, 11 months ago (2017-01-05 01:00:52 UTC) #22
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/f4a69e95680a3af7aa01266c3036441ee795703b Cr-Commit-Position: refs/heads/master@{#441537}
3 years, 11 months ago (2017-01-05 01:04:02 UTC) #24
James Cook
3 years, 11 months ago (2017-01-05 02:35:49 UTC) #25
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698