diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 21:54:14 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 21:54:14 +0000 |
commit | bd1b96700fa45143e04bd8d07a0a519d6962f4a6 (patch) | |
tree | 73ed252babadbeb0e1550581e23d29c7a65f701e /chrome/browser/bookmarks/bookmark_model.h | |
parent | 7c51b0ee951bf8ed70d0ed6506567991c611d070 (diff) | |
download | chromium_src-bd1b96700fa45143e04bd8d07a0a519d6962f4a6.zip chromium_src-bd1b96700fa45143e04bd8d07a0a519d6962f4a6.tar.gz chromium_src-bd1b96700fa45143e04bd8d07a0a519d6962f4a6.tar.bz2 |
Lands http://codereview.chromium.org/155128 for Thiago.
Description from Thiago:
Converting the history::StarredEntry::Type to a type defined in BookmarkNode.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/155165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_model.h')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h index 19b0ed0..9726624 100644 --- a/chrome/browser/bookmarks/bookmark_model.h +++ b/chrome/browser/bookmarks/bookmark_model.h @@ -44,6 +44,12 @@ class BookmarkNode : public TreeNode<BookmarkNode> { friend class BookmarkModel; public: + enum Type { + URL, + FOLDER, + BOOKMARK_BAR, + OTHER_NODE + }; // Creates a new node with the specified url and id of 0 explicit BookmarkNode(const GURL& url); // Creates a new node with the specified url and id. @@ -62,8 +68,8 @@ class BookmarkNode : public TreeNode<BookmarkNode> { void set_id(int id) { id_ = id; } // Returns the type of this node. - history::StarredEntry::Type GetType() const { return type_; } - void SetType(history::StarredEntry::Type type) { type_ = type; } + BookmarkNode::Type GetType() const { return type_; } + void SetType(BookmarkNode::Type type) { type_ = type; } // Returns the time the bookmark/group was added. const base::Time& date_added() const { return date_added_; } @@ -80,10 +86,10 @@ class BookmarkNode : public TreeNode<BookmarkNode> { // Convenience for testing if this nodes represents a group. A group is // a node whose type is not URL. - bool is_folder() const { return type_ != history::StarredEntry::URL; } + bool is_folder() const { return type_ != URL; } // Is this a URL? - bool is_url() const { return type_ == history::StarredEntry::URL; } + bool is_url() const { return type_ == URL; } // Returns the favicon. In nearly all cases you should use the method // BookmarkModel::GetFavicon rather than this. BookmarkModel::GetFavicon @@ -140,8 +146,7 @@ class BookmarkNode : public TreeNode<BookmarkNode> { const GURL url_; // Type of node. - // TODO(sky): bug 1256202, convert this into a type defined here. - history::StarredEntry::Type type_; + BookmarkNode::Type type_; // Date we were created. base::Time date_added_; |