| Index: components/bookmarks/browser/bookmark_model.h
|
| diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h
|
| index 3268b459a3da687ea2d1dad180209e48d8733dbf..4a065dc77456b7c2759d5534dd045c2468d288a8 100644
|
| --- a/components/bookmarks/browser/bookmark_model.h
|
| +++ b/components/bookmarks/browser/bookmark_model.h
|
| @@ -17,7 +17,6 @@
|
| #include "base/strings/string16.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/synchronization/waitable_event.h"
|
| -#include "components/bookmarks/browser/bookmark_client.h"
|
| #include "components/bookmarks/browser/bookmark_node.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "ui/gfx/image/image.h"
|
| @@ -28,6 +27,7 @@ class PrefService;
|
| namespace base {
|
| class FilePath;
|
| class SequencedTaskRunner;
|
| +struct UserMetricsAction;
|
| }
|
|
|
| namespace favicon_base {
|
| @@ -40,15 +40,17 @@ enum class MatchingAlgorithm;
|
|
|
| namespace bookmarks {
|
|
|
| +class BookmarkClient;
|
| class BookmarkCodecTest;
|
| class BookmarkExpandedStateTracker;
|
| class BookmarkIndex;
|
| +class BookmarkIndexTest;
|
| class BookmarkLoadDetails;
|
| +struct BookmarkMatch;
|
| class BookmarkModelObserver;
|
| class BookmarkStorage;
|
| class ScopedGroupBookmarkActions;
|
| class TestBookmarkClient;
|
| -struct BookmarkMatch;
|
|
|
| // BookmarkModel --------------------------------------------------------------
|
|
|
| @@ -67,7 +69,7 @@ class BookmarkModel : public KeyedService {
|
| base::string16 title;
|
| };
|
|
|
| - explicit BookmarkModel(BookmarkClient* client);
|
| + explicit BookmarkModel(scoped_ptr<BookmarkClient> bookmark_client);
|
| ~BookmarkModel() override;
|
|
|
| // KeyedService:
|
| @@ -111,7 +113,7 @@ class BookmarkModel : public KeyedService {
|
|
|
| // Returns whether the given |node| is one of the permanent nodes - root node,
|
| // 'bookmark bar' node, 'other' node or 'mobile' node, or one of the root
|
| - // nodes supplied by the |client_|.
|
| + // nodes supplied by the |bookmark_client_|.
|
| bool is_permanent_node(const BookmarkNode* node) const {
|
| return node && (node == &root_ || node->parent() == &root_);
|
| }
|
| @@ -320,12 +322,13 @@ class BookmarkModel : public KeyedService {
|
| // Returns true if the permanent node |node| should always be visible.
|
| bool IsPermanentNodeVisible(const BookmarkPermanentNode* node);
|
|
|
| - // Forward the |action| to |client_| to record it. See
|
| + // Forward the |action| to |bookmark_client_| to record it. See
|
| // BookmarkClient::RecordAction for more information.
|
| void RecordAction(const base::UserMetricsAction& action);
|
|
|
| private:
|
| friend class BookmarkCodecTest;
|
| + friend class BookmarkIndexTest;
|
| friend class BookmarkStorage;
|
| friend class ScopedGroupBookmarkActions;
|
| friend class TestBookmarkClient;
|
| @@ -433,7 +436,7 @@ class BookmarkModel : public KeyedService {
|
| // Returns true if touch icons are preferred over favicons.
|
| bool PreferTouchIcon();
|
|
|
| - BookmarkClient* const client_;
|
| + scoped_ptr<BookmarkClient> bookmark_client_;
|
|
|
| // Whether the initial set of data has been loaded.
|
| bool loaded_;
|
|
|