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

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

Issue 8273041: Permanent folders changes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Nit fixing. Created 9 years, 2 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 | « no previous file | 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
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index 2bb5b43dabb3201198c94fcf05cece8579ed5627..cb7c08732e618cf15ff327adb520d0c54e861d72 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -115,7 +115,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode> {
// representation but we may want to suppress some nodes.
// TODO(yfriedman): Remove this when enable-synced-bookmarks-folder is
// no longer a command line flag.
- bool IsVisible() const;
+ virtual bool IsVisible() const;
// TODO(sky): Consider adding last visit time here, it'll greatly simplify
// HistoryContentsProvider.
@@ -158,6 +158,25 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode> {
DISALLOW_COPY_AND_ASSIGN(BookmarkNode);
};
+// BookmarkPermanentNode ------------------------------------------------------
+
+// The permanent nodes are the three special top level nodes "bookmark_bar",
+// "synced" and "other". Their visibility is dependent on information from the
+// profile, hence this special subclass to accomodate them.
+class BookmarkPermanentNode : public BookmarkNode {
+ public:
+ // Creates a new node with |id| and |url|.
+ BookmarkPermanentNode(int64 id, const GURL& url, Profile* profile);
+
+ virtual ~BookmarkPermanentNode();
+ virtual bool IsVisible() const;
+
+ private:
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode);
+};
+
// BookmarkModel --------------------------------------------------------------
// BookmarkModel provides a directed acyclic graph of URLs and folders.
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698