summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_drag_data.h
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 22:29:20 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 22:29:20 +0000
commitb3c33d463366d2725ec4d669b98dc468a751c541 (patch)
treed8496a8ae8fc73ed71b93d67c055e9f1bba4fcc7 /chrome/browser/bookmarks/bookmark_drag_data.h
parent7b91dfd0bce7b4f864d9654e8bd0a9f93683cec0 (diff)
downloadchromium_src-b3c33d463366d2725ec4d669b98dc468a751c541.zip
chromium_src-b3c33d463366d2725ec4d669b98dc468a751c541.tar.gz
chromium_src-b3c33d463366d2725ec4d669b98dc468a751c541.tar.bz2
Make bookmark model public interface use const BookmarkNode* instead of
BookmarkNode*. This helps in making the BookmarkNode class setters public also without worrying about someone inadvertently changing BookmarkNode properties directly for bookmark model bookmarks. Change all the call sites to reflect this. BUG=none TEST=none Review URL: http://codereview.chromium.org/146116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_drag_data.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_drag_data.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/bookmarks/bookmark_drag_data.h b/chrome/browser/bookmarks/bookmark_drag_data.h
index 5e8db56..88cb6d4 100644
--- a/chrome/browser/bookmarks/bookmark_drag_data.h
+++ b/chrome/browser/bookmarks/bookmark_drag_data.h
@@ -38,7 +38,7 @@ class Profile;
struct BookmarkDragData {
// Element represents a single node.
struct Element {
- explicit Element(BookmarkNode* node);
+ explicit Element(const BookmarkNode* node);
Element() : is_url(false), id_(0) {}
@@ -68,8 +68,8 @@ struct BookmarkDragData {
BookmarkDragData() { }
// Created a BookmarkDragData populated from the arguments.
- explicit BookmarkDragData(BookmarkNode* node);
- explicit BookmarkDragData(const std::vector<BookmarkNode*>& nodes);
+ explicit BookmarkDragData(const BookmarkNode* node);
+ explicit BookmarkDragData(const std::vector<const BookmarkNode*>& nodes);
#if defined(TOOLKIT_VIEWS)
// Writes elements to data. If there is only one element and it is a URL
@@ -93,11 +93,11 @@ struct BookmarkDragData {
// created from the same profile then the nodes from the model are returned.
// If the nodes can't be found (may have been deleted), an empty vector is
// returned.
- std::vector<BookmarkNode*> GetNodes(Profile* profile) const;
+ std::vector<const BookmarkNode*> GetNodes(Profile* profile) const;
// Convenience for getting the first node. Returns NULL if the data doesn't
// match any nodes or there is more than one node.
- BookmarkNode* GetFirstNode(Profile* profile) const;
+ const BookmarkNode* GetFirstNode(Profile* profile) const;
// Do we contain valid data?
bool is_valid() const { return !elements.empty(); }