Chromium Code Reviews| Index: chrome/browser/bookmarks/bookmark_model.h |
| diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h |
| index 0e4ada682fb4b5c3b84d194a4a12d26a714a0c99..720010d63f4f58d58e548c517f07ddb3a29609fb 100644 |
| --- a/chrome/browser/bookmarks/bookmark_model.h |
| +++ b/chrome/browser/bookmarks/bookmark_model.h |
| @@ -50,7 +50,8 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode> { |
| URL, |
| FOLDER, |
| BOOKMARK_BAR, |
| - OTHER_NODE |
| + OTHER_NODE, |
| + SYNCED |
| }; |
| // Creates a new node with the specified url and id of 0 |
| explicit BookmarkNode(const GURL& url); |
| @@ -193,6 +194,9 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { |
| // Returns the 'other' node. This is NULL until loaded. |
| const BookmarkNode* other_node() { return other_node_; } |
| + // Returns the 'synced' node. This is NULL until loaded. |
| + const BookmarkNode* synced_node() { return synced_node_; } |
| + |
| // Returns the parent the last node was added to. This never returns NULL |
| // (as long as the model is loaded). |
| const BookmarkNode* GetParentForNewNodes(); |
| @@ -311,6 +315,9 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { |
| bool is_bookmark_bar_node(const BookmarkNode* node) const { |
| return node == bookmark_bar_node_; |
| } |
| + bool is_synced_bookmarks_node(const BookmarkNode* node) const { |
| + return node == synced_node_; |
| + } |
|
tim (not reviewing)
2011/05/05 20:18:34
nit - indent
Yaron
2011/05/05 22:51:31
Done.
|
| bool is_other_bookmarks_node(const BookmarkNode* node) const { |
| return node == other_node_; |
| } |
| @@ -319,7 +326,8 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { |
| bool is_permanent_node(const BookmarkNode* node) const { |
| return is_root(node) || |
| is_bookmark_bar_node(node) || |
| - is_other_bookmarks_node(node); |
| + is_other_bookmarks_node(node) || |
| + is_synced_bookmarks_node(node); |
| } |
| // Sets the store to NULL, making it so the BookmarkModel does not persist |
| @@ -380,10 +388,11 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { |
| // Returns true if the parent and index are valid. |
| bool IsValidIndex(const BookmarkNode* parent, int index, bool allow_end); |
| - // Creates the bookmark bar/other nodes. These call into |
| + // Creates the bookmark bar/synced/other nodes. These call into |
| // CreateRootNodeFromStarredEntry. |
| BookmarkNode* CreateBookmarkNode(); |
| BookmarkNode* CreateOtherBookmarksNode(); |
| + BookmarkNode* CreateSyncedBookmarksNode(); |
| // Creates a root node (either the bookmark bar node or other node) from the |
| // specified starred entry. |
| @@ -439,6 +448,7 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { |
| BookmarkNode* bookmark_bar_node_; |
| BookmarkNode* other_node_; |
| + BookmarkNode* synced_node_; |
| // The maximum ID assigned to the bookmark nodes in the model. |
| int64 next_node_id_; |