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

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

Issue 319543003: Create the managed_node at the ChromeBookmarkClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/DEPS ('k') | chrome/browser/bookmarks/chrome_bookmark_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 512178baddc68e7b70776cffaa9deddcbaf90a32..de67a1b3e45d3d0ad71af7cf708f6001d339f091 100644
--- a/chrome/browser/bookmarks/chrome_bookmark_client.h
+++ b/chrome/browser/bookmarks/chrome_bookmark_client.h
@@ -6,9 +6,12 @@
#define CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
#include "base/compiler_specific.h"
+#include "base/deferred_sequenced_task_runner.h"
+#include "base/memory/ref_counted.h"
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
#include "components/bookmarks/browser/bookmark_client.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "components/policy/core/browser/managed_bookmarks_tracker.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -28,6 +31,12 @@ class ChromeBookmarkClient : public BookmarkClient,
// Returns the BookmarkModel that corresponds to this ChromeBookmarkClient.
BookmarkModel* model() { return model_.get(); }
+ // Returns the managed_node.
+ const BookmarkNode* managed_node() { return managed_node_; }
+
+ // Returns true if the given node belongs to the managed bookmarks tree.
+ bool IsDescendantOfManagedNode(const BookmarkNode* node);
+
// BookmarkClient:
virtual bool PreferTouchIcon() OVERRIDE;
virtual base::CancelableTaskTracker::TaskId GetFaviconImageForURL(
@@ -70,9 +79,19 @@ class ChromeBookmarkClient : public BookmarkClient,
virtual void BookmarkAllNodesRemoved(
BookmarkModel* model,
const std::set<GURL>& removed_urls) OVERRIDE;
+ virtual void BookmarkModelLoaded(BookmarkModel* model,
+ bool ids_reassigned) OVERRIDE;
// Helper for GetLoadExtraNodesCallback().
- static bookmarks::BookmarkPermanentNodeList LoadExtraNodes(int64* next_id);
+ static bookmarks::BookmarkPermanentNodeList LoadExtraNodes(
+ const scoped_refptr<base::DeferredSequencedTaskRunner>& profile_io_runner,
+ BookmarkPermanentNode* managed_node,
+ scoped_ptr<base::ListValue> initial_managed_bookmarks,
+ int64* next_node_id);
+
+ // Returns the management domain that configured the managed bookmarks,
+ // or an empty string.
+ std::string GetManagedBookmarksDomain();
Profile* profile_;
@@ -80,6 +99,9 @@ class ChromeBookmarkClient : public BookmarkClient,
scoped_ptr<BookmarkModel> model_;
+ policy::ManagedBookmarksTracker managed_bookmarks_tracker_;
+ BookmarkPermanentNode* managed_node_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClient);
};
« no previous file with comments | « chrome/browser/bookmarks/DEPS ('k') | chrome/browser/bookmarks/chrome_bookmark_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698