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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_utils.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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/bookmarks/bookmark_utils.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index e548b54981f18b6687bfae840fce4e7a70c5c78f..0fbcf5fef114b21cded0de50a1fd8e6c93715c49 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -184,8 +184,8 @@ bool ShouldRemoveBookmarkOpenPagesUI(Profile* profile) {
int GetBookmarkDragOperation(content::BrowserContext* browser_context,
const BookmarkNode* node) {
PrefService* prefs = user_prefs::UserPrefs::Get(browser_context);
- Profile* profile = Profile::FromBrowserContext(browser_context);
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
+ BookmarkModel* model =
+ BookmarkModelFactory::GetForBrowserContext(browser_context);
int move = ui::DragDropTypes::DRAG_MOVE;
if (!prefs->GetBoolean(bookmarks::prefs::kEditBookmarksEnabled) ||
@@ -224,7 +224,7 @@ int GetBookmarkDropOperation(Profile* profile,
if (!IsValidBookmarkDropLocation(profile, data, parent, index))
return ui::DragDropTypes::DRAG_NONE;
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile);
if (!model->client()->CanBeEditedByUser(parent))
return ui::DragDropTypes::DRAG_NONE;
@@ -257,7 +257,7 @@ bool IsValidBookmarkDropLocation(Profile* profile,
if (!data.is_valid())
return false;
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile);
if (!model->client()->CanBeEditedByUser(drop_parent))
return false;
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_tab_helper.cc ('k') | chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698