| Index: components/bookmarks/browser/bookmark_client.h
|
| diff --git a/components/bookmarks/browser/bookmark_client.h b/components/bookmarks/browser/bookmark_client.h
|
| index e6b96ceb9e248867b9b5f6d5ce2e375262625c83..0dcdeacd4cbef9a52612fddfa58140e2a354d724 100644
|
| --- a/components/bookmarks/browser/bookmark_client.h
|
| +++ b/components/bookmarks/browser/bookmark_client.h
|
| @@ -10,12 +10,12 @@
|
| #include <vector>
|
|
|
| #include "base/callback_forward.h"
|
| +#include "base/macros.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"
|
| #include "components/favicon_base/favicon_types.h"
|
| -#include "components/keyed_service/core/keyed_service.h"
|
|
|
| class GURL;
|
|
|
| @@ -25,12 +25,13 @@ struct UserMetricsAction;
|
|
|
| namespace bookmarks {
|
|
|
| +class BookmarkModel;
|
| class BookmarkNode;
|
| class BookmarkPermanentNode;
|
|
|
| // This class abstracts operations that depends on the embedder's environment,
|
| // e.g. Chrome.
|
| -class BookmarkClient : public KeyedService {
|
| +class BookmarkClient {
|
| public:
|
| // Types representing a set of BookmarkNode and a mapping from BookmarkNode
|
| // to the number of time the corresponding URL has been typed by the user in
|
| @@ -41,6 +42,12 @@ class BookmarkClient : public KeyedService {
|
| typedef base::Callback<void(BookmarkPermanentNode*, BookmarkPermanentNode*)>
|
| ExtraNodeLoadedCallback;
|
|
|
| + BookmarkClient();
|
| + virtual ~BookmarkClient();
|
| +
|
| + // Called upon initialization of BookmarkModel.
|
| + virtual void Init(BookmarkModel* bookmark_model) = 0;
|
| +
|
| // 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:
|
| // - favicon_base::FAVICON, the returned gfx::Image is a multi-resolution
|
| @@ -53,16 +60,16 @@ class BookmarkClient : public KeyedService {
|
| const GURL& page_url,
|
| favicon_base::IconType type,
|
| const favicon_base::FaviconImageCallback& callback,
|
| - base::CancelableTaskTracker* tracker);
|
| + base::CancelableTaskTracker* tracker) = 0;
|
|
|
| - // Returns true if the embedder supports typed count for URL.
|
| - virtual bool SupportsTypedCountForNodes();
|
| + // Returns true if the embedder supports typed count for URL.
|
| + virtual bool SupportsTypedCountForNodes() = 0;
|
|
|
| // Retrieves the number of time each BookmarkNode URL has been typed in
|
| // the Omnibox by the user.
|
| virtual void GetTypedCountForNodes(
|
| const NodeSet& nodes,
|
| - NodeTypedCountPairs* node_typed_count_pairs);
|
| + NodeTypedCountPairs* node_typed_count_pairs) = 0;
|
|
|
| // Wrapper around RecordAction defined in base/metrics/user_metrics.h
|
| // that ensure that the action is posted from the correct thread.
|
| @@ -79,8 +86,8 @@ class BookmarkClient : public KeyedService {
|
| virtual void DoneLoading(BookmarkPermanentNode* managed_node,
|
| BookmarkPermanentNode* supervised_node) = 0;
|
|
|
| - protected:
|
| - ~BookmarkClient() override {}
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(BookmarkClient);
|
| };
|
|
|
| } // namespace bookmarks
|
|
|