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

Issue 1105413002: Avoid conversion of index to BookmarkNode pointer unnacessarily. (Closed)

Created:
5 years, 7 months ago by Deepak
Modified:
5 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, zea+watch_chromium.org, pvalenzuela+watch_chromium.org, tfarina, maxbogue+watch_chromium.org, browser-components-watch_chromium.org, plaree+watch_chromium.org, noyau+watch_chromium.org, chromium-apps-reviews_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid unnacessarily conversion from index to BookmarkNode pointer. BookmarkModel::Remove() should take BookmarkNode pointer. This will few save conversion from BookmarkNode pointer to index for calling Remove and converting index to BookmarkNode pointer to call RemoveAndDeleteNode(). This way we will able to save call's like parent->GetIndexOf(node),and again conversion to Bookmark Pointer. BUG=330842 Committed: https://crrev.com/39312670405cf55ce9b4790817e11f3492ae3c05 Cr-Commit-Position: refs/heads/master@{#328135}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Changes as per review comments. #

Total comments: 8

Patch Set 3 : Changes as per review comments. #

Total comments: 2

Patch Set 4 : Changes as per review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -92 lines) Patch
M chrome/browser/android/bookmarks/bookmarks_bridge.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/android/provider/chrome_browser_provider.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/history/android/bookmark_model_sql_handler.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/glue/bookmark_change_processor.cc View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/bookmark_model_associator.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_bookmark_unittest.cc View 1 6 chunks +12 lines, -13 lines 0 comments Download
M chrome/browser/sync/test/integration/bookmarks_helper.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_ui_utils_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm View 1 6 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm View 1 4 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/bookmarks/browser/bookmark_index_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/bookmarks/browser/bookmark_model.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M components/bookmarks/browser/bookmark_model.cc View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M components/bookmarks/browser/bookmark_model_unittest.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M components/bookmarks/browser/bookmark_utils.cc View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M components/bookmarks/managed/managed_bookmarks_tracker.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc View 1 3 chunks +4 lines, -6 lines 0 comments Download
M components/undo/bookmark_undo_service.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/undo/bookmark_undo_service_test.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (3 generated)
Deepak
PTAL
5 years, 7 months ago (2015-04-28 13:46:24 UTC) #2
tfarina
me -> sky Thanks!
5 years, 7 months ago (2015-04-28 14:27:28 UTC) #4
Deepak
On 2015/04/28 14:27:28, tfarina wrote: > me -> sky > > Thanks! @sky Please review. ...
5 years, 7 months ago (2015-04-29 02:50:01 UTC) #5
sky
https://codereview.chromium.org/1105413002/diff/1/components/bookmarks/browser/bookmark_model.h File components/bookmarks/browser/bookmark_model.h (right): https://codereview.chromium.org/1105413002/diff/1/components/bookmarks/browser/bookmark_model.h#newcode132 components/bookmarks/browser/bookmark_model.h:132: void Remove(const BookmarkNode* parent, const BookmarkNode* child); If you're ...
5 years, 7 months ago (2015-04-29 15:26:27 UTC) #6
Deepak
On 2015/04/29 15:26:27, sky wrote: > https://codereview.chromium.org/1105413002/diff/1/components/bookmarks/browser/bookmark_model.h > File components/bookmarks/browser/bookmark_model.h (right): > > https://codereview.chromium.org/1105413002/diff/1/components/bookmarks/browser/bookmark_model.h#newcode132 > ...
5 years, 7 months ago (2015-04-30 07:15:26 UTC) #7
sky
https://codereview.chromium.org/1105413002/diff/20001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1105413002/diff/20001/components/bookmarks/browser/bookmark_model.cc#newcode193 components/bookmarks/browser/bookmark_model.cc:193: if (!loaded_ || is_root_node(child->parent())) { || is_root_node(child) https://codereview.chromium.org/1105413002/diff/20001/components/bookmarks/browser/bookmark_model.cc#newcode851 components/bookmarks/browser/bookmark_model.cc:851: ...
5 years, 7 months ago (2015-04-30 18:16:13 UTC) #8
Deepak
Thanks for review. Changes done as suggested. PTAL https://codereview.chromium.org/1105413002/diff/20001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1105413002/diff/20001/components/bookmarks/browser/bookmark_model.cc#newcode193 components/bookmarks/browser/bookmark_model.cc:193: if ...
5 years, 7 months ago (2015-05-02 08:15:49 UTC) #9
sky
https://codereview.chromium.org/1105413002/diff/40001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1105413002/diff/40001/components/bookmarks/browser/bookmark_model.cc#newcode852 components/bookmarks/browser/bookmark_model.cc:852: if (!IsValidIndex(parent, index, false)) { The DCHECK covers this. ...
5 years, 7 months ago (2015-05-04 15:18:44 UTC) #10
Deepak
Thanks for review. Changes done. PTAL https://codereview.chromium.org/1105413002/diff/40001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1105413002/diff/40001/components/bookmarks/browser/bookmark_model.cc#newcode852 components/bookmarks/browser/bookmark_model.cc:852: if (!IsValidIndex(parent, index, ...
5 years, 7 months ago (2015-05-04 15:32:13 UTC) #11
sky
LGTM
5 years, 7 months ago (2015-05-04 15:32:54 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1105413002/60001
5 years, 7 months ago (2015-05-04 15:33:34 UTC) #14
Deepak
On 2015/05/04 15:32:54, sky wrote: > LGTM Thanks.
5 years, 7 months ago (2015-05-04 15:33:42 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 7 months ago (2015-05-04 16:29:54 UTC) #16
commit-bot: I haz the power
5 years, 7 months ago (2015-05-04 16:30:51 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/39312670405cf55ce9b4790817e11f3492ae3c05
Cr-Commit-Position: refs/heads/master@{#328135}

Powered by Google App Engine
This is Rietveld 408576698