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

Issue 2771663002: mash: Refactor ChromeLauncherController's ShelfDelegate code. (Closed)

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

Description

mash: Refactor ChromeLauncherController's ShelfDelegate code. Simplify Chrome's ShelfDelegate code and rely on ShelfModel more. (should help extract ShelfDelegate functionality from Chrome) Make similar changes to TestShelfDelegate (rely on ShelfModel). Remove marginally useful ShelfDelegate::HasShelfIDToAppIDMapping. Inline Unpin, Pin, DoPinAppWithID, and DoUnpinAppWithID helper functions. Inline TogglePinned functionality in LauncherContextMenu. Rename UnpinAndUpdatePrefs->UnpinShelfItemInternal, nix pref changes. (inline pref changes in PinAppWithID and UnpinAppWithID for now) BUG=557406 TEST=Automated tests pass; no Chrome OS shelf item behavior changes. R=jamescook@chromium.org Review-Url: https://codereview.chromium.org/2771663002 Cr-Commit-Position: refs/heads/master@{#459175} Committed: https://chromium.googlesource.com/chromium/src/+/bedb0ae2fde426fac9960793663e674d4fe26637

Patch Set 1 #

Patch Set 2 : Inline TogglePinned; fixes and cleanup. #

Patch Set 3 : Sync and rebase. #

Patch Set 4 : Fix MENU_PIN switch statement. #

Patch Set 5 : Make TestShelfDelegate work like Chrome; fix browser test. #

Patch Set 6 : Revise uma logic; make TestShelfDelegate set [un]pinned item types. #

Total comments: 14

Patch Set 7 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -249 lines) Patch
M ash/common/shelf/shelf_delegate.h View 1 2 3 4 5 6 2 chunks +6 lines, -8 lines 0 comments Download
M ash/common/test/test_shelf_delegate.h View 1 2 3 4 3 chunks +2 lines, -17 lines 0 comments Download
M ash/common/test/test_shelf_delegate.cc View 1 2 3 4 5 5 chunks +38 lines, -36 lines 0 comments Download
M ash/metrics/user_metrics_recorder.cc View 1 2 3 4 5 2 chunks +5 lines, -17 lines 0 comments Download
M ash/mus/shelf_delegate_mus.h View 1 chunk +0 lines, -1 line 0 comments Download
M ash/mus/shelf_delegate_mus.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h View 1 3 chunks +2 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc View 1 2 3 4 5 6 12 chunks +68 lines, -119 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc View 1 2 3 4 6 chunks +5 lines, -9 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.cc View 1 1 chunk +0 lines, -12 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 34 (28 generated)
msw
Hey James, please take a look; thanks!
3 years, 9 months ago (2017-03-23 03:54:54 UTC) #22
James Cook
I love it. One question about sync, otherwise just nits. https://codereview.chromium.org/2771663002/diff/100001/ash/common/shelf/shelf_delegate.h File ash/common/shelf/shelf_delegate.h (right): https://codereview.chromium.org/2771663002/diff/100001/ash/common/shelf/shelf_delegate.h#newcode20 ...
3 years, 9 months ago (2017-03-23 16:43:50 UTC) #23
msw
Please take another look; thanks! https://codereview.chromium.org/2771663002/diff/100001/ash/common/shelf/shelf_delegate.h File ash/common/shelf/shelf_delegate.h (right): https://codereview.chromium.org/2771663002/diff/100001/ash/common/shelf/shelf_delegate.h#newcode20 ash/common/shelf/shelf_delegate.h:20: // Get the shelf ...
3 years, 9 months ago (2017-03-23 18:08:10 UTC) #24
James Cook
LGTM
3 years, 9 months ago (2017-03-23 19:05:34 UTC) #29
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/2771663002/120001
3 years, 9 months ago (2017-03-23 19:16:49 UTC) #31
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 19:26:12 UTC) #34
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/bedb0ae2fde426fac9960793663e...

Powered by Google App Engine
This is Rietveld 408576698