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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 60253004: bookmarks: Reuse data member |model_| in ShowContextMenuForView() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 843edd02a1173dd60fd08456008f98736b4c5cbf..4a9c90b448f998d4840dcfd0e772b908b6e8fe71 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -1241,12 +1241,11 @@ void BookmarkBarView::ShowContextMenuForView(views::View* source,
parent = model_->bookmark_bar_node();
nodes.push_back(parent);
}
- Profile* profile = browser_->profile();
bool close_on_remove =
- (parent == BookmarkModelFactory::GetForProfile(profile)->other_node()) &&
- (parent->child_count() == 1);
+ (parent == model_->other_node()) && (parent->child_count() == 1);
+
context_menu_.reset(new BookmarkContextMenu(
- GetWidget(), browser_, profile,
+ GetWidget(), browser_, browser_->profile(),
browser_->tab_strip_model()->GetActiveWebContents(),
parent, nodes, close_on_remove));
context_menu_->RunMenuAt(point, source_type);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698