Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: chrome/browser/bookmarks/bookmark_model.h

Issue 155165: Lands http://codereview.chromium.org/155128 for Thiago.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer.cc ('k') | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_model.h
===================================================================
--- chrome/browser/bookmarks/bookmark_model.h (revision 20068)
+++ chrome/browser/bookmarks/bookmark_model.h (working copy)
@@ -44,6 +44,12 @@
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 @@
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 @@
// 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 @@
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_;
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer.cc ('k') | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698