diff options
author | deepak.m1 <deepak.m1@samsung.com> | 2015-04-27 19:16:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-28 02:17:11 +0000 |
commit | 66c3f8f0c969fc279ba5e37408ef0feef6851904 (patch) | |
tree | 464107e36676b5e38d5afc23ed76fbc1c39d5a92 | |
parent | 4f3a98748e1196f0bc6c63022f41deb0ea392f46 (diff) | |
download | chromium_src-66c3f8f0c969fc279ba5e37408ef0feef6851904.zip chromium_src-66c3f8f0c969fc279ba5e37408ef0feef6851904.tar.gz chromium_src-66c3f8f0c969fc279ba5e37408ef0feef6851904.tar.bz2 |
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}
-rw-r--r-- | components/bookmarks/browser/bookmark_model.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc index 80808ca..10d5b2f 100644 --- a/components/bookmarks/browser/bookmark_model.cc +++ b/components/bookmarks/browser/bookmark_model.cc @@ -886,7 +886,7 @@ void BookmarkModel::RemoveNodeAndGetRemovedUrls(BookmarkNode* node, // This method does not explicitly acquires a lock. url_lock_.AssertAcquired(); DCHECK(removed_urls); - BookmarkNode* parent = AsMutable(node->parent()); + BookmarkNode* parent = node->parent(); DCHECK(parent); parent->Remove(node); RemoveNode(node, removed_urls); |