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

Unified Diff: components/bookmarks/browser/bookmark_client.h

Issue 1203713002: Limit access to ChromeBookmarkClient to bookmarks code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_bookmark_client
Patch Set: Rebase Created 5 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
Index: components/bookmarks/browser/bookmark_client.h
diff --git a/components/bookmarks/browser/bookmark_client.h b/components/bookmarks/browser/bookmark_client.h
index 3ea0269cface46c0d34da06088515e635f1c517a..e6b96ceb9e248867b9b5f6d5ce2e375262625c83 100644
--- a/components/bookmarks/browser/bookmark_client.h
+++ b/components/bookmarks/browser/bookmark_client.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "components/bookmarks/browser/bookmark_storage.h"
#include "components/favicon_base/favicon_callback.h"
@@ -37,9 +38,8 @@ class BookmarkClient : public KeyedService {
typedef std::set<const BookmarkNode*> NodeSet;
typedef std::pair<const BookmarkNode*, int> NodeTypedCountPair;
typedef std::vector<NodeTypedCountPair> NodeTypedCountPairs;
-
- // Returns true if the embedder favors touch icons over favicons.
- virtual bool PreferTouchIcon();
+ typedef base::Callback<void(BookmarkPermanentNode*, BookmarkPermanentNode*)>
+ ExtraNodeLoadedCallback;
// Requests a favicon from the history cache for the web page at |page_url|.
// |callback| is run when the favicon has been fetched. If |type| is:
@@ -64,29 +64,20 @@ class BookmarkClient : public KeyedService {
const NodeSet& nodes,
NodeTypedCountPairs* node_typed_count_pairs);
- // Returns whether the embedder wants permanent node |node|
- // to always be visible or to only show them when not empty.
- virtual bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) = 0;
-
// Wrapper around RecordAction defined in base/metrics/user_metrics.h
// that ensure that the action is posted from the correct thread.
virtual void RecordAction(const base::UserMetricsAction& action) = 0;
// Returns a task that will be used to load any additional root nodes. This
// task will be invoked in the Profile's IO task runner.
sky 2015/06/23 22:03:53 Document what callback is.
- virtual LoadExtraCallback GetLoadExtraNodesCallback() = 0;
-
- // Returns true if the |permanent_node| can have its title updated.
- virtual bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) = 0;
-
- // Returns true if |node| should sync.
- virtual bool CanSyncNode(const BookmarkNode* node) = 0;
-
- // Returns true if this node can be edited by the user.
- // TODO(joaodasilva): the model should check this more aggressively, and
- // should give the client a means to temporarily disable those checks.
- // http://crbug.com/49598
- virtual bool CanBeEditedByUser(const BookmarkNode* node) = 0;
+ virtual LoadExtraCallback GetLoadExtraNodesCallback(
+ scoped_ptr<BookmarkPermanentNode> managed_node,
+ scoped_ptr<BookmarkPermanentNode> supervised_node,
+ const ExtraNodeLoadedCallback& callback) = 0;
+
+ // Called when BookmarkModel finished loading.
+ virtual void DoneLoading(BookmarkPermanentNode* managed_node,
+ BookmarkPermanentNode* supervised_node) = 0;
protected:
~BookmarkClient() override {}

Powered by Google App Engine
This is Rietveld 408576698