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

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

Issue 769153007: Managed bookmarks for supervised users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: string change Created 5 years, 11 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
Index: chrome/browser/bookmarks/chrome_bookmark_client.h
diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.h b/chrome/browser/bookmarks/chrome_bookmark_client.h
index 363a58ebfe5371128fefe1bde9dafd374badb92b..cf2ff05b8c17cc1e0788e7275ee088056c6498d0 100644
--- a/chrome/browser/bookmarks/chrome_bookmark_client.h
+++ b/chrome/browser/bookmarks/chrome_bookmark_client.h
@@ -35,16 +35,29 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient,
// KeyedService:
void Shutdown() override;
- // Returns the managed_node.
const BookmarkNode* managed_node() { return managed_node_; }
+ const BookmarkNode* supervised_node() { return supervised_node_; }
noyau (Ping after 24h) 2015/01/23 12:14:52 Can we have a comment before those two methods des
Marc Treib 2015/01/26 12:27:42 Done.
// Returns true if the given node belongs to the managed bookmarks tree.
bool IsDescendantOfManagedNode(const BookmarkNode* node);
-
// Returns true if there is at least one managed node in the |list|.
bool HasDescendantsOfManagedNode(
const std::vector<const BookmarkNode*>& list);
+ // Returns true if the given node belongs to the supervised bookmarks tree.
+ bool IsDescendantOfSupervisedNode(const BookmarkNode* node);
+ // Returns true if there is at least one supervised node in the |list|.
+ bool HasDescendantsOfSupervisedNode(
+ const std::vector<const BookmarkNode*>& list);
+
+ // Returns true if the given node belongs to either the managed or the
+ // supervised bookmarks tree.
+ bool IsDescendantOfManagedOrSupervisedNode(const BookmarkNode* node);
+ // Returns true if there is at least one managed or supervised node in the
+ // |list|.
+ bool HasDescendantsOfManagedOrSupervisedNode(
+ const std::vector<const BookmarkNode*>& list);
+
// bookmarks::BookmarkClient:
bool PreferTouchIcon() override;
base::CancelableTaskTracker::TaskId GetFaviconImageForPageURL(
@@ -83,6 +96,8 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient,
static bookmarks::BookmarkPermanentNodeList LoadExtraNodes(
scoped_ptr<BookmarkPermanentNode> managed_node,
scoped_ptr<base::ListValue> initial_managed_bookmarks,
+ scoped_ptr<BookmarkPermanentNode> supervised_node,
+ scoped_ptr<base::ListValue> initial_supervised_bookmarks,
int64* next_node_id);
// Returns the management domain that configured the managed bookmarks,
@@ -103,9 +118,16 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient,
// the call to Shutdown. Must be valid for the whole interval.
bookmarks::BookmarkModel* model_;
+ // Managed bookmarks are defined by an enterprise policy.
scoped_ptr<policy::ManagedBookmarksTracker> managed_bookmarks_tracker_;
+ // The top-level managed bookmarks folder.
BookmarkPermanentNode* managed_node_;
+ // Supervised bookmarks are defined by the custodian of a supervised user.
+ scoped_ptr<policy::ManagedBookmarksTracker> supervised_bookmarks_tracker_;
+ // The top-level supervised bookmarks folder.
+ BookmarkPermanentNode* supervised_node_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClient);
};

Powered by Google App Engine
This is Rietveld 408576698