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

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

Issue 6837021: Disable bookmark editing (views UI). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 8 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/bookmarks/bookmark_utils.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_utils.cc
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc
index bcc49af9ece8912815503ccfa4e2489932dbfac4..ae7f4ce39110efff37e44e87e0f77e2a0872dba4 100644
--- a/chrome/browser/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/bookmarks/bookmark_utils.cc
@@ -221,12 +221,14 @@ int PreferredDropOperation(int source_operations, int operations) {
return ui::DragDropTypes::DRAG_NONE;
}
-int BookmarkDragOperation(const BookmarkNode* node) {
+int BookmarkDragOperation(Profile* profile, const BookmarkNode* node) {
+ int move = ui::DragDropTypes::DRAG_MOVE;
+ if (!profile->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled))
+ move = 0;
if (node->is_url()) {
- return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE |
- ui::DragDropTypes::DRAG_LINK;
+ return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK | move;
}
- return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE;
+ return ui::DragDropTypes::DRAG_COPY | move;
}
#if defined(TOOLKIT_VIEWS)
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698