Commit 66c3f8f0 authored by deepak.m1's avatar deepak.m1 Committed by Commit bot

Eliminate an unnecessary AsMutable() call in BookmarkModel::RemoveNodeAndGetRemovedUrls()

BookmarkModel::RemoveNodeAndGetRemovedUrls() does not require AsMutable
as sunction itself suggest RemoveNode and get its url, and parent() can
return non const pointer. So AsMutable() is not required in this case.

BUG=481500

Review URL: https://codereview.chromium.org/1104093002

Cr-Commit-Position: refs/heads/master@{#327220}
parent 4f3a9874
...@@ -886,7 +886,7 @@ void BookmarkModel::RemoveNodeAndGetRemovedUrls(BookmarkNode* node, ...@@ -886,7 +886,7 @@ void BookmarkModel::RemoveNodeAndGetRemovedUrls(BookmarkNode* node,
// This method does not explicitly acquires a lock. // This method does not explicitly acquires a lock.
url_lock_.AssertAcquired(); url_lock_.AssertAcquired();
DCHECK(removed_urls); DCHECK(removed_urls);
BookmarkNode* parent = AsMutable(node->parent()); BookmarkNode* parent = node->parent();
DCHECK(parent); DCHECK(parent);
parent->Remove(node); parent->Remove(node);
RemoveNode(node, removed_urls); RemoveNode(node, removed_urls);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment