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

Issue 3047055: Mac: Fix kill button and selection in task manager (Closed)

Created:
10 years, 4 months ago by Nico
Modified:
9 years, 7 months ago
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Mac: Fix kill button and selection in task manager BUG=51488, 51486 TEST=Sort on a changing column such as %cpu or goats teleported. The selection should follow the selected rows (i.e. if the "maps" process jumps from row 2 to row 4, the selected row should follow). "Kill process" should kill the currently selected process, not the process that's at that index when no sorting is happening. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=55361

Patch Set 1 #

Total comments: 15

Patch Set 2 : comments #

Total comments: 2

Patch Set 3 : test #

Patch Set 4 : find-replace fail #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -15 lines) Patch
M chrome/browser/cocoa/task_manager_mac.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/task_manager_mac.mm View 1 2 3 8 chunks +49 lines, -13 lines 0 comments Download
M chrome/browser/cocoa/task_manager_mac_unittest.mm View 1 chunk +34 lines, -0 lines 0 comments Download
M chrome/browser/task_manager.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Nico
blah
10 years, 4 months ago (2010-08-07 19:26:17 UTC) #1
viettrungluu
The complexity has gotten to the point where I'd be happier if you had a ...
10 years, 4 months ago (2010-08-07 19:54:04 UTC) #2
Miranda Callahan
http://codereview.chromium.org/3047055/diff/1/2 File chrome/browser/cocoa/task_manager_mac.h (right): http://codereview.chromium.org/3047055/diff/1/2#newcode31 chrome/browser/cocoa/task_manager_mac.h:31: // Contain a permutation of [0..|model_->ResourceCount() - 1|]. Used ...
10 years, 4 months ago (2010-08-07 20:01:52 UTC) #3
viettrungluu
http://codereview.chromium.org/3047055/diff/1/2 File chrome/browser/cocoa/task_manager_mac.h (right): http://codereview.chromium.org/3047055/diff/1/2#newcode31 chrome/browser/cocoa/task_manager_mac.h:31: // Contain a permutation of [0..|model_->ResourceCount() - 1|]. Used ...
10 years, 4 months ago (2010-08-07 20:03:50 UTC) #4
Nico
working on a test… http://codereview.chromium.org/3047055/diff/1/2 File chrome/browser/cocoa/task_manager_mac.h (right): http://codereview.chromium.org/3047055/diff/1/2#newcode31 chrome/browser/cocoa/task_manager_mac.h:31: // Contain a permutation of ...
10 years, 4 months ago (2010-08-07 20:05:00 UTC) #5
Miranda Callahan
http://codereview.chromium.org/3047055/diff/1/2 File chrome/browser/cocoa/task_manager_mac.h (right): http://codereview.chromium.org/3047055/diff/1/2#newcode31 chrome/browser/cocoa/task_manager_mac.h:31: // Contain a permutation of [0..|model_->ResourceCount() - 1|]. Used ...
10 years, 4 months ago (2010-08-07 20:09:22 UTC) #6
Nico
Writing a test without rewriting the task manager stuff seems to be difficult. Here's what ...
10 years, 4 months ago (2010-08-07 20:20:17 UTC) #7
Nico
Added a test for the selection behavior (since I'm on 10.5, I need to uncomment ...
10 years, 4 months ago (2010-08-07 20:28:59 UTC) #8
viettrungluu
10 years, 4 months ago (2010-08-07 20:34:46 UTC) #9
LGETM.

http://codereview.chromium.org/3047055/diff/8001/9002
File chrome/browser/cocoa/task_manager_mac.mm (right):

http://codereview.chromium.org/3047055/diff/8001/9002#newcode137
chrome/browser/cocoa/task_manager_mac.mm:137: std::vector<int> modelSelection;
You might consider factoring out the algorithmic bits into a pure functional
helper (which would be easy to test).

http://codereview.chromium.org/3047055/diff/8001/9002#newcode506
chrome/browser/cocoa/task_manager_mac.mm:506: [window_controller_ deselectRows];
You might consider making -reloadData just take a BOOL parameter for whether to
deselect rows or not (or, more precisely, start with the current selection or
none).

Powered by Google App Engine
This is Rietveld 408576698