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

Unified Diff: chrome/browser/ui/views/wrench_menu.cc

Issue 10827047: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/wrench_menu.cc
===================================================================
--- chrome/browser/ui/views/wrench_menu.cc (revision 148477)
+++ chrome/browser/ui/views/wrench_menu.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
@@ -750,7 +751,8 @@
WrenchMenu::~WrenchMenu() {
if (bookmark_menu_delegate_.get()) {
- BookmarkModel* model = browser_->profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(
+ browser_->profile());
if (model)
model->RemoveObserver(this);
}
@@ -777,7 +779,8 @@
views::MenuRunner::MENU_DELETED)
return;
if (bookmark_menu_delegate_.get()) {
- BookmarkModel* model = browser_->profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(
+ browser_->profile());
if (model)
model->RemoveObserver(this);
}
@@ -1089,7 +1092,8 @@
if (bookmark_menu_delegate_.get())
return; // Already created the menu.
- BookmarkModel* model = browser_->profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(
+ browser_->profile());
if (!model->IsLoaded())
return;
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698