From b3c33d463366d2725ec4d669b98dc468a751c541 Mon Sep 17 00:00:00 2001 From: "munjal@chromium.org" Date: Fri, 26 Jun 2009 22:29:20 +0000 Subject: 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 --- chrome/browser/views/bookmark_menu_controller_views.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'chrome/browser/views/bookmark_menu_controller_views.h') diff --git a/chrome/browser/views/bookmark_menu_controller_views.h b/chrome/browser/views/bookmark_menu_controller_views.h index a87ecfe..e9bd5d3 100644 --- a/chrome/browser/views/bookmark_menu_controller_views.h +++ b/chrome/browser/views/bookmark_menu_controller_views.h @@ -39,7 +39,7 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, Profile* profile, PageNavigator* page_navigator, gfx::NativeView parent, - BookmarkNode* node, + const BookmarkNode* node, int start_child_index, bool show_other_folder); @@ -52,7 +52,7 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, void Cancel(); // Returns the node the menu is showing for. - BookmarkNode* node() const { return node_; } + const BookmarkNode* node() const { return node_; } // Returns the menu. views::MenuItemView* menu() const { return menu_.get(); } @@ -86,7 +86,7 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, virtual void BookmarkModelChanged(); virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, - BookmarkNode* node); + const BookmarkNode* node); private: // BookmarkMenuController deletes itself as necessary. @@ -98,7 +98,7 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, // Creates an entry in menu for each child node of |parent| starting at // |start_child_index|. - void BuildMenu(BookmarkNode* parent, + void BuildMenu(const BookmarkNode* parent, int start_child_index, views::MenuItemView* menu, int* next_menu_id); @@ -113,14 +113,14 @@ class BookmarkMenuController : public BaseBookmarkModelObserver, gfx::NativeView parent_; // The node we're showing the contents of. - BookmarkNode* node_; + const BookmarkNode* node_; // Maps from menu id to BookmarkNode. - std::map menu_id_to_node_map_; + std::map menu_id_to_node_map_; // Mapping from node to menu id. This only contains entries for nodes of type // URL. - std::map node_to_menu_id_map_; + std::map node_to_menu_id_map_; // The menu. scoped_ptr menu_; -- cgit v1.1