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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 10831062: 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
Index: chrome/browser/ui/browser_commands.cc
===================================================================
--- chrome/browser/ui/browser_commands.cc (revision 148782)
+++ chrome/browser/ui/browser_commands.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browsing_data/browsing_data_helper.h"
@@ -560,7 +561,8 @@
void BookmarkCurrentPage(Browser* browser) {
content::RecordAction(UserMetricsAction("Star"));
- BookmarkModel* model = browser->profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(
Peter Kasting 2012/07/28 00:37:21 Nit: I would probably wrap after '=' instead (2 pl
+ browser->profile());
if (!model || !model->IsLoaded())
return; // Ignore requests until bookmarks are loaded.
@@ -585,7 +587,8 @@
}
bool CanBookmarkCurrentPage(const Browser* browser) {
- BookmarkModel* model = browser->profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(
+ browser->profile());
return browser_defaults::bookmarks_enabled &&
browser->profile()->GetPrefs()->GetBoolean(
prefs::kEditBookmarksEnabled) &&
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_tab_helper.cc ('k') | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698