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

Unified Diff: components/policy/core/browser/managed_bookmarks_tracker.h

Issue 769153007: Managed bookmarks for supervised users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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: components/policy/core/browser/managed_bookmarks_tracker.h
diff --git a/components/policy/core/browser/managed_bookmarks_tracker.h b/components/policy/core/browser/managed_bookmarks_tracker.h
index c40d5e09e9e145ac4d2cc77d896a8a5e2b96c70d..16966c0196f05f7afef52d94b9a748e67c1bc163 100644
--- a/components/policy/core/browser/managed_bookmarks_tracker.h
+++ b/components/policy/core/browser/managed_bookmarks_tracker.h
@@ -36,6 +36,7 @@ class POLICY_EXPORT ManagedBookmarksTracker {
ManagedBookmarksTracker(BookmarkModel* model,
Pam (message me for reviews) 2015/01/14 14:03:37 Please add a comment explaining |is_supervised|.
Marc Treib 2015/01/14 16:40:50 Done. I've also added a class-level comment, and u
PrefService* prefs,
+ bool is_supervised,
const GetManagementDomainCallback& callback);
~ManagedBookmarksTracker();
@@ -54,8 +55,17 @@ class POLICY_EXPORT ManagedBookmarksTracker {
// be called after loading the initial bookmarks.
void Init(BookmarkPermanentNode* managed_node);
+ bool is_supervised() const { return is_supervised_; }
+
+ // Public for testing.
+ static const char* GetPrefName(bool is_supervised);
+
private:
+ const char* GetPrefName() const;
+ base::string16 GetBookmarksFolderTitle() const;
+
void ReloadManagedBookmarks();
+
void UpdateBookmarks(const BookmarkNode* folder, const base::ListValue* list);
static bool LoadBookmark(const base::ListValue* list,
size_t index,
@@ -64,6 +74,7 @@ class POLICY_EXPORT ManagedBookmarksTracker {
const base::ListValue** children);
BookmarkModel* model_;
+ bool is_supervised_;
BookmarkPermanentNode* managed_node_;
PrefService* prefs_;
PrefChangeRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698