| 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 30646be27b787c205741aff18f18fdce39fe325e..c9a28b3705f21a4bf079151fbbdd967b834ceab3 100644
|
| --- a/chrome/browser/bookmarks/chrome_bookmark_client.h
|
| +++ b/chrome/browser/bookmarks/chrome_bookmark_client.h
|
| @@ -5,21 +5,23 @@
|
| #ifndef CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
|
| #define CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_H_
|
|
|
| +#include <set>
|
| #include <vector>
|
|
|
| +#include "base/callback_list.h"
|
| #include "base/deferred_sequenced_task_runner.h"
|
| #include "base/macros.h"
|
| #include "components/bookmarks/browser/base_bookmark_model_observer.h"
|
| #include "components/bookmarks/browser/bookmark_client.h"
|
| #include "components/policy/core/browser/managed_bookmarks_tracker.h"
|
| -#include "content/public/browser/notification_observer.h"
|
| -#include "content/public/browser/notification_registrar.h"
|
|
|
| class BookmarkModel;
|
| +class GURL;
|
| +class HistoryService;
|
| +class HistoryServiceFactory;
|
| class Profile;
|
|
|
| class ChromeBookmarkClient : public bookmarks::BookmarkClient,
|
| - public content::NotificationObserver,
|
| public BaseBookmarkModelObserver {
|
| public:
|
| explicit ChromeBookmarkClient(Profile* profile);
|
| @@ -60,12 +62,10 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient,
|
| virtual bool CanSyncNode(const BookmarkNode* node) OVERRIDE;
|
| virtual bool CanBeEditedByUser(const BookmarkNode* node) OVERRIDE;
|
|
|
| - // content::NotificationObserver:
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) OVERRIDE;
|
| -
|
| private:
|
| + friend class HistoryServiceFactory;
|
| + void SetHistoryService(HistoryService* history_service);
|
| +
|
| // BaseBookmarkModelObserver:
|
| virtual void BookmarkModelChanged() OVERRIDE;
|
| virtual void BookmarkNodeRemoved(BookmarkModel* model,
|
| @@ -91,7 +91,13 @@ class ChromeBookmarkClient : public bookmarks::BookmarkClient,
|
|
|
| Profile* profile_;
|
|
|
| - content::NotificationRegistrar registrar_;
|
| + // HistoryService associated to the Profile. Due to circular dependency, this
|
| + // cannot be passed to the constructor, nor lazily fetched. Instead the value
|
| + // is initialized from HistoryServiceFactory.
|
| + HistoryService* history_service_;
|
| +
|
| + scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription>
|
| + favicon_changed_subscription_;
|
|
|
| // Pointer to the BookmarkModel. Will be non-NULL from the call to Init to
|
| // the call to Shutdown. Must be valid for the whole interval.
|
|
|