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

Issue 2379863002: Fix object ownership in ui/base/models. (Closed)

Created:
4 years, 2 months ago by Avi (use Gerrit)
Modified:
4 years, 2 months ago
CC:
chromium-reviews, tfarina, markusheintz_, msramek+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix object ownership in ui/base/models. This establishes an API in ui/base/models that strictly manages object ownership, and then fixes all code that interacts with it to also properly handle ownership. BUG=555865, 554289 Committed: https://crrev.com/cee78e4e2ca3b3f4f7e2806d24789c73da9a7638 Cr-Commit-Position: refs/heads/master@{#422136}

Patch Set 1 #

Patch Set 2 : compile views, bookmarks remove fix #

Patch Set 3 : more fixing #

Patch Set 4 : fixes #

Patch Set 5 : chromeos/android #

Total comments: 12

Patch Set 6 : sky #

Patch Set 7 : resrite of reorder #

Patch Set 8 : stray debugging line #

Total comments: 11

Patch Set 9 : more android work #

Patch Set 10 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -573 lines) Patch
M ash/shell/app_list.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/android/bookmarks/bookmark_bridge.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/android/bookmarks/partner_bookmarks_reader.cc View 1 2 3 4 5 6 7 8 4 chunks +18 lines, -12 lines 0 comments Download
M chrome/browser/android/bookmarks/partner_bookmarks_shim.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/android/bookmarks/partner_bookmarks_shim.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc View 1 2 3 4 5 6 7 8 9 14 chunks +100 lines, -78 lines 0 comments Download
M chrome/browser/browsing_data/cookies_tree_model.h View 11 chunks +23 lines, -21 lines 0 comments Download
M chrome/browser/browsing_data/cookies_tree_model.cc View 32 chunks +48 lines, -53 lines 0 comments Download
M chrome/browser/browsing_data/cookies_tree_model_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_editor_view.h View 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc View 5 chunks +16 lines, -13 lines 0 comments Download
M components/bookmarks/browser/bookmark_codec.cc View 4 chunks +9 lines, -2 lines 0 comments Download
M components/bookmarks/browser/bookmark_index.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/bookmarks/browser/bookmark_model.h View 1 2 chunks +5 lines, -4 lines 0 comments Download
M components/bookmarks/browser/bookmark_model.cc View 1 2 3 4 5 6 7 18 chunks +91 lines, -65 lines 0 comments Download
M components/bookmarks/browser/bookmark_model_unittest.cc View 5 chunks +11 lines, -8 lines 0 comments Download
M components/bookmarks/browser/bookmark_storage.h View 1 3 chunks +14 lines, -12 lines 0 comments Download
M components/bookmarks/browser/bookmark_storage.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/bookmarks/browser/bookmark_utils_unittest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M components/bookmarks/managed/managed_bookmark_service.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/bookmarks/managed/managed_bookmarks_tracker.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M components/bookmarks/test/test_bookmark_client.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M components/bookmarks/test/test_bookmark_client.cc View 1 2 3 2 chunks +10 lines, -11 lines 0 comments Download
M ui/app_list/search/mixer.cc View 1 2 chunks +11 lines, -19 lines 0 comments Download
M ui/app_list/views/app_list_view_unittest.cc View 1 2 3 chunks +8 lines, -5 lines 0 comments Download
M ui/app_list/views/search_result_list_view_unittest.cc View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M ui/app_list/views/search_result_page_view_unittest.cc View 1 2 3 3 chunks +7 lines, -5 lines 0 comments Download
M ui/base/models/list_model.h View 1 6 chunks +31 lines, -28 lines 0 comments Download
M ui/base/models/list_model_unittest.cc View 6 chunks +19 lines, -22 lines 0 comments Download
M ui/base/models/tree_node_iterator.h View 3 chunks +3 lines, -3 lines 0 comments Download
M ui/base/models/tree_node_iterator_unittest.cc View 4 chunks +13 lines, -16 lines 0 comments Download
M ui/base/models/tree_node_model.h View 1 2 3 4 5 6 11 chunks +51 lines, -56 lines 0 comments Download
M ui/base/models/tree_node_model_unittest.cc View 12 chunks +42 lines, -74 lines 0 comments Download
M ui/views/controls/tree/tree_view.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/tree/tree_view.cc View 5 chunks +9 lines, -8 lines 0 comments Download
M ui/views/controls/tree/tree_view_unittest.cc View 7 chunks +10 lines, -10 lines 0 comments Download
M ui/views/examples/tree_view_example.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/tree_view_example.cc View 3 chunks +18 lines, -19 lines 0 comments Download

Messages

Total messages: 52 (37 generated)
Avi (use Gerrit)
bauerb: chrome/browser/android, chrome/browser/browsing_data benwells: ui/app_list sky: ash/shell, chrome/browser/ui/views, components/bookmarks, ui/base, ui/views The main ownership changes ...
4 years, 2 months ago (2016-09-29 20:54:21 UTC) #22
sky
Ugh! https://codereview.chromium.org/2379863002/diff/80001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/2379863002/diff/80001/components/bookmarks/browser/bookmark_model.cc#newcode693 components/bookmarks/browser/bookmark_model.cc:693: for (size_t i = 0; i < ordered_nodes.size() ...
4 years, 2 months ago (2016-09-29 22:06:49 UTC) #23
Avi (use Gerrit)
Scott, re your comment "ugh", can you clarify if that's an actionable comment for me? ...
4 years, 2 months ago (2016-09-29 22:59:59 UTC) #26
Avi (use Gerrit)
https://codereview.chromium.org/2379863002/diff/80001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/2379863002/diff/80001/components/bookmarks/browser/bookmark_model.cc#newcode695 components/bookmarks/browser/bookmark_model.cc:695: mutable_parent->Remove(AsMutable(ordered_nodes[i])); On 2016/09/29 22:59:58, Avi wrote: > On 2016/09/29 ...
4 years, 2 months ago (2016-09-30 00:16:48 UTC) #31
sky
Ugh! was more of the size of the review and the scope of the changes ...
4 years, 2 months ago (2016-09-30 03:07:05 UTC) #36
Avi (use Gerrit)
https://codereview.chromium.org/2379863002/diff/140001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/2379863002/diff/140001/components/bookmarks/browser/bookmark_model.cc#newcode692 components/bookmarks/browser/bookmark_model.cc:692: if (ordered_nodes.size() > 1) { On 2016/09/30 03:07:05, sky ...
4 years, 2 months ago (2016-09-30 03:42:24 UTC) #37
benwells
ui/app_list lgtm
4 years, 2 months ago (2016-09-30 04:07:50 UTC) #38
Bernhard Bauer
LGTM, but there are some more ownership clarifications we could do with partner bookmarks. Raw ...
4 years, 2 months ago (2016-09-30 08:58:44 UTC) #39
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/2379863002/160001
4 years, 2 months ago (2016-09-30 14:54:04 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/39966)
4 years, 2 months ago (2016-09-30 15:14:24 UTC) #44
sky
LGTM https://codereview.chromium.org/2379863002/diff/140001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/2379863002/diff/140001/components/bookmarks/browser/bookmark_model.cc#newcode692 components/bookmarks/browser/bookmark_model.cc:692: if (ordered_nodes.size() > 1) { On 2016/09/30 03:42:23, ...
4 years, 2 months ago (2016-09-30 15:57:53 UTC) #45
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/2379863002/180001
4 years, 2 months ago (2016-09-30 16:09:45 UTC) #48
Avi (use Gerrit)
https://codereview.chromium.org/2379863002/diff/140001/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc File chrome/browser/android/bookmarks/partner_bookmarks_reader.cc (right): https://codereview.chromium.org/2379863002/diff/140001/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc#newcode157 chrome/browser/android/bookmarks/partner_bookmarks_reader.cc:157: BookmarkNode* node = NULL; On 2016/09/30 08:58:43, Bernhard Bauer ...
4 years, 2 months ago (2016-09-30 16:10:12 UTC) #49
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 2 months ago (2016-09-30 17:08:34 UTC) #50
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 17:11:25 UTC) #52
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/cee78e4e2ca3b3f4f7e2806d24789c73da9a7638
Cr-Commit-Position: refs/heads/master@{#422136}

Powered by Google App Engine
This is Rietveld 408576698