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

Issue 2551243002: Use ChromeLauncherControllerImpl::GetItem; cleanup. (Closed)

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

Description

Use ChromeLauncherControllerImpl::GetItem; cleanup. Use GetItem in more places, reduce some index use. Be more consistent about checking for negative indices. Change GetItem to return a pointer and handle null. Update id_to_item_controller_map_ for loops. BUG=557406 TEST=No Chrome OS shelf behavior changes. R=jamescook@chromium.org Committed: https://crrev.com/48f434bf27b2b671d04eb833a9bc208453e517b3 Cr-Commit-Position: refs/heads/master@{#436659}

Patch Set 1 #

Patch Set 2 : Update comment. #

Patch Set 3 : Skip app-id mapping check that breaks tests. #

Total comments: 3

Patch Set 4 : Make GetItem return a pointer; update callers. #

Patch Set 5 : Add early return to ShelfModel::Set. #

Total comments: 2

Patch Set 6 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -119 lines) Patch
M ash/common/shelf/shelf_model.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc View 1 2 3 14 chunks +69 lines, -108 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h View 1 2 3 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 31 (20 generated)
msw
Hey James, please take a look; thanks!
4 years ago (2016-12-05 21:07:48 UTC) #3
msw
On 2016/12/05 21:07:48, msw wrote: > Hey James, please take a look; thanks! Please hold, ...
4 years ago (2016-12-05 22:19:36 UTC) #8
msw
Tests should pass... please take a look; thanks!
4 years ago (2016-12-06 00:19:18 UTC) #11
James Cook
LGTM with an idea for ShelfModel. Nice patch! https://codereview.chromium.org/2551243002/diff/40001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc (right): https://codereview.chromium.org/2551243002/diff/40001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc#newcode315 chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc:315: model_->Set(model_->ItemIndexByID(id), ...
4 years ago (2016-12-06 00:27:01 UTC) #12
msw
https://codereview.chromium.org/2551243002/diff/40001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc (right): https://codereview.chromium.org/2551243002/diff/40001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc#newcode315 chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc:315: model_->Set(model_->ItemIndexByID(id), item); On 2016/12/06 00:27:01, James Cook wrote: > ...
4 years ago (2016-12-06 00:30:41 UTC) #13
msw
https://codereview.chromium.org/2551243002/diff/40001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc (right): https://codereview.chromium.org/2551243002/diff/40001/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc#newcode315 chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc:315: model_->Set(model_->ItemIndexByID(id), item); On 2016/12/06 00:30:40, msw wrote: > On ...
4 years ago (2016-12-06 01:56:22 UTC) #18
James Cook
still lgtm Sorry for the confusion. All I meant was adding a safe return inside ...
4 years ago (2016-12-06 05:54:22 UTC) #21
msw
On 2016/12/06 05:54:22, James Cook wrote: > I'm fine with returning a pointer as long ...
4 years ago (2016-12-06 18:02:23 UTC) #22
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/2551243002/100001
4 years ago (2016-12-06 18:03:04 UTC) #25
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-06 18:46:32 UTC) #29
commit-bot: I haz the power
4 years ago (2016-12-06 18:48:23 UTC) #31
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/48f434bf27b2b671d04eb833a9bc208453e517b3
Cr-Commit-Position: refs/heads/master@{#436659}

Powered by Google App Engine
This is Rietveld 408576698