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

Issue 2146033003: TableView: 3-phase ToggleSortOrder (sorted/reversed/unsorted) (Closed)

Created:
4 years, 5 months ago by ncarter (slow)
Modified:
4 years, 5 months ago
Reviewers:
afakhry, sky
CC:
chromium-reviews, tfarina, Ben Goodger (Google)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TableView: Make ToggleSortOrder a three-phase operation that cycles through (ascending -> descending -> no sort) if the column is initially ascending, or (descending -> ascending -> no sort) if the column is initially descending. Expose a set_sort_descriptors() method so that TaskManagerTableModel can apply its saved user preference directly. Previously that worked by calling ToggleSortOrder the right number of times, which was weird, since ToggleSortOrder is basically a click event handler. Expand unittests to verify the implementation. BUG=616897, 54909 Committed: https://crrev.com/cb592d4b10cd8677aeac0694c5befd489b262a7a Cr-Commit-Position: refs/heads/master@{#407607}

Patch Set 1 #

Patch Set 2 : Expand unittests. #

Patch Set 3 : Back out some unneeded renaming. #

Patch Set 4 : <utility> for std::move #

Patch Set 5 : Fix bug. #

Total comments: 19

Patch Set 6 : sky's fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -46 lines) Patch
M chrome/browser/ui/task_manager/task_manager_table_model.h View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/task_manager/task_manager_table_model.cc View 1 2 1 chunk +2 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/new_task_manager_view.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/new_task_manager_view.cc View 1 2 3 4 5 2 chunks +12 lines, -4 lines 0 comments Download
M ui/views/controls/table/table_view.h View 1 2 3 4 5 2 chunks +8 lines, -4 lines 0 comments Download
M ui/views/controls/table/table_view.cc View 1 2 3 4 5 3 chunks +18 lines, -13 lines 0 comments Download
M ui/views/controls/table/table_view_unittest.cc View 1 2 3 4 5 4 chunks +118 lines, -9 lines 0 comments Download

Messages

Total messages: 29 (21 generated)
ncarter (slow)
Ben, here's a CL to make it possible to get back to the model ordering ...
4 years, 5 months ago (2016-07-14 04:28:06 UTC) #14
ncarter (slow)
Scott: you seem like the best reviewer for a TableView change (when you get back). ...
4 years, 5 months ago (2016-07-15 18:47:40 UTC) #16
sky
https://codereview.chromium.org/2146033003/diff/80001/chrome/browser/ui/task_manager/task_manager_table_model.h File chrome/browser/ui/task_manager/task_manager_table_model.h (right): https://codereview.chromium.org/2146033003/diff/80001/chrome/browser/ui/task_manager/task_manager_table_model.h#newcode48 chrome/browser/ui/task_manager/task_manager_table_model.h:48: virtual void SetSortDescriptor(TableSortDescriptor sort_descriptor) = 0; const TableSortDescriptor& ? ...
4 years, 5 months ago (2016-07-18 16:18:58 UTC) #17
ncarter (slow)
https://codereview.chromium.org/2146033003/diff/80001/chrome/browser/ui/task_manager/task_manager_table_model.h File chrome/browser/ui/task_manager/task_manager_table_model.h (right): https://codereview.chromium.org/2146033003/diff/80001/chrome/browser/ui/task_manager/task_manager_table_model.h#newcode48 chrome/browser/ui/task_manager/task_manager_table_model.h:48: virtual void SetSortDescriptor(TableSortDescriptor sort_descriptor) = 0; On 2016/07/18 16:18:58, ...
4 years, 5 months ago (2016-07-25 20:04:02 UTC) #20
sky
LGTM https://codereview.chromium.org/2146033003/diff/80001/ui/views/controls/table/table_view.cc File ui/views/controls/table/table_view.cc (right): https://codereview.chromium.org/2146033003/diff/80001/ui/views/controls/table/table_view.cc#newcode247 ui/views/controls/table/table_view.cc:247: sort.clear(); On 2016/07/25 20:04:01, ncarter wrote: > On ...
4 years, 5 months ago (2016-07-25 20:23:21 UTC) #21
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/2146033003/100001
4 years, 5 months ago (2016-07-25 21:54:04 UTC) #25
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 5 months ago (2016-07-25 21:59:31 UTC) #27
commit-bot: I haz the power
4 years, 5 months ago (2016-07-25 22:02:30 UTC) #29
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/cb592d4b10cd8677aeac0694c5befd489b262a7a
Cr-Commit-Position: refs/heads/master@{#407607}

Powered by Google App Engine
This is Rietveld 408576698