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

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

Issue 1203713002: Limit access to ChromeBookmarkClient to bookmarks code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_bookmark_client
Patch Set: Rebase Created 5 years, 6 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 0956cc020e5c11b78244eaf0bd76172c04fdc725..f763645306d9f10bef20852791959ffab8b11996 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -387,7 +387,7 @@ int GetBookmarkDragOperation(content::BrowserContext* browser_context,
int move = ui::DragDropTypes::DRAG_MOVE;
if (!prefs->GetBoolean(bookmarks::prefs::kEditBookmarksEnabled) ||
- !model->client()->CanBeEditedByUser(node)) {
+ !model->CanBeEditedByUser(node)) {
move = ui::DragDropTypes::DRAG_NONE;
}
if (node->is_url())
@@ -423,14 +423,14 @@ int GetBookmarkDropOperation(Profile* profile,
return ui::DragDropTypes::DRAG_NONE;
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
- if (!model->client()->CanBeEditedByUser(parent))
+ if (!model->CanBeEditedByUser(parent))
return ui::DragDropTypes::DRAG_NONE;
const BookmarkNode* dragged_node =
data.GetFirstNode(model, profile->GetPath());
if (dragged_node) {
// User is dragging from this profile.
- if (!model->client()->CanBeEditedByUser(dragged_node)) {
+ if (!model->CanBeEditedByUser(dragged_node)) {
// Do a copy instead of a move when dragging bookmarks that the user can't
// modify.
return ui::DragDropTypes::DRAG_COPY;
@@ -456,7 +456,7 @@ bool IsValidBookmarkDropLocation(Profile* profile,
return false;
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
- if (!model->client()->CanBeEditedByUser(drop_parent))
+ if (!model->CanBeEditedByUser(drop_parent))
return false;
const base::FilePath& profile_path = profile->GetPath();

Powered by Google App Engine
This is Rietveld 408576698