summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_index.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_index.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_index.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_index.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/bookmarks/bookmark_index.h b/chrome/browser/bookmarks/bookmark_index.h
index 98a6a57..f3da604 100644
--- a/chrome/browser/bookmarks/bookmark_index.h
+++ b/chrome/browser/bookmarks/bookmark_index.h
@@ -34,10 +34,10 @@ class BookmarkIndex {
BookmarkIndex() {}
// Invoked when a bookmark has been added to the model.
- void Add(BookmarkNode* node);
+ void Add(const BookmarkNode* node);
// Invoked when a bookmark has been removed from the model.
- void Remove(BookmarkNode* node);
+ void Remove(const BookmarkNode* node);
// Returns up to |max_count| of bookmarks containing the text |query|.
void GetBookmarksWithTitlesMatching(
@@ -46,7 +46,7 @@ class BookmarkIndex {
std::vector<bookmark_utils::TitleMatch>* results);
private:
- typedef std::set<BookmarkNode*> NodeSet;
+ typedef std::set<const BookmarkNode*> NodeSet;
typedef std::map<std::wstring, NodeSet> Index;
// Used when finding the set of bookmarks that match a query. Each match
@@ -116,10 +116,10 @@ class BookmarkIndex {
std::vector<std::wstring> ExtractQueryWords(const std::wstring& query);
// Adds |node| to |index_|.
- void RegisterNode(const std::wstring& term, BookmarkNode* node);
+ void RegisterNode(const std::wstring& term, const BookmarkNode* node);
// Removes |node| from |index_|.
- void UnregisterNode(const std::wstring& term, BookmarkNode* node);
+ void UnregisterNode(const std::wstring& term, const BookmarkNode* node);
Index index_;