diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 22:29:20 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 22:29:20 +0000 |
commit | b3c33d463366d2725ec4d669b98dc468a751c541 (patch) | |
tree | d8496a8ae8fc73ed71b93d67c055e9f1bba4fcc7 /chrome/browser/bookmarks/bookmark_table_model.h | |
parent | 7b91dfd0bce7b4f864d9654e8bd0a9f93683cec0 (diff) | |
download | chromium_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_table_model.h')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_table_model.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/bookmarks/bookmark_table_model.h b/chrome/browser/bookmarks/bookmark_table_model.h index 7dd7f9e..997d7f0 100644 --- a/chrome/browser/bookmarks/bookmark_table_model.h +++ b/chrome/browser/bookmarks/bookmark_table_model.h @@ -24,7 +24,7 @@ class BookmarkTableModel : public TableModel, static BookmarkTableModel* CreateRecentlyBookmarkedModel( BookmarkModel* model); static BookmarkTableModel* CreateBookmarkTableModelForFolder( - BookmarkModel* model, BookmarkNode* node); + BookmarkModel* model, const BookmarkNode* node); static BookmarkTableModel* CreateSearchTableModel( BookmarkModel* model, const std::wstring& text, @@ -44,15 +44,15 @@ class BookmarkTableModel : public TableModel, virtual void Loaded(BookmarkModel* model) {} virtual void BookmarkModelBeingDeleted(BookmarkModel* model); virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, - BookmarkNode* node) {} + const BookmarkNode* node) {} // Returns the index of the specified node, or -1 if the node isn't in the // model. - virtual int IndexOfNode(BookmarkNode* node); + virtual int IndexOfNode(const BookmarkNode* node); // Returns the BookmarkNode at the specified index. - virtual BookmarkNode* GetNodeForRow(int row) = 0; + virtual const BookmarkNode* GetNodeForRow(int row) = 0; // Returns the underlying BookmarkModel. BookmarkModel* model() const { return model_; } @@ -62,7 +62,7 @@ class BookmarkTableModel : public TableModel, private: // Builds the path shown in the path column for the specified node. - void BuildPath(BookmarkNode* node, std::wstring* path); + void BuildPath(const BookmarkNode* node, std::wstring* path); BookmarkModel* model_; TableModelObserver* observer_; |