| Index: components/bookmarks/test/test_bookmark_client.h
|
| diff --git a/components/bookmarks/test/test_bookmark_client.h b/components/bookmarks/test/test_bookmark_client.h
|
| index 13307282c3c8eb1d386e9de85b6600041972420c..298453515c872d17c9c6c3f264f05a98429760a2 100644
|
| --- a/components/bookmarks/test/test_bookmark_client.h
|
| +++ b/components/bookmarks/test/test_bookmark_client.h
|
| @@ -21,10 +21,41 @@ class TestBookmarkClient : public BookmarkClient {
|
| // BookmarkModel* is owned by the caller.
|
| scoped_ptr<BookmarkModel> CreateModel(bool index_urls);
|
|
|
| + // Sets the list of extra nodes to be returned by the next call to
|
| + // GetLoadExtraNodesCallback(). CreateModel() won't pick this up; the model
|
| + // needs to get Load() invoked to reach to the client for this call.
|
| + void SetExtraNodesToLoad(bookmarks::BookmarkPermanentNodeList extra_nodes);
|
| +
|
| + // Returns the current extra_nodes, set via ExtraNodesLoaded().
|
| + const std::vector<BookmarkPermanentNode*>& extra_nodes() {
|
| + return extra_nodes_;
|
| + }
|
| +
|
| + // Returns true if |node| is one of the |extra_nodes_|.
|
| + bool IsExtraNodeRoot(const BookmarkNode* node);
|
| +
|
| + // Returns true if |node| belongs to the tree of one of the |extra_nodes_|.
|
| + bool IsAnExtraNode(const BookmarkNode* node);
|
| +
|
| private:
|
| // BookmarkClient:
|
| - virtual bool IsPermanentNodeVisible(int node_type) OVERRIDE;
|
| + virtual bool IsPermanentNodeVisible(const BookmarkNode* node) OVERRIDE;
|
| virtual void RecordAction(const base::UserMetricsAction& action) OVERRIDE;
|
| + virtual bookmarks::LoadExtraCallback GetLoadExtraNodesCallback() OVERRIDE;
|
| + virtual void ExtraNodesLoaded(
|
| + const std::vector<BookmarkPermanentNode*>& extra_nodes) OVERRIDE;
|
| + virtual bool CanRemoveNode(const BookmarkNode* node) OVERRIDE;
|
| + virtual bool CanSetTitle(const BookmarkNode* permanent_node) OVERRIDE;
|
| + virtual bool CanSyncNode(const BookmarkNode* node) OVERRIDE;
|
| + virtual bool CanReorderChildren(const BookmarkNode* parent) OVERRIDE;
|
| +
|
| + // Helpers for GetLoadExtraNodesCallback().
|
| + static bookmarks::BookmarkPermanentNodeList LoadExtraNodes(
|
| + bookmarks::BookmarkPermanentNodeList extra_nodes,
|
| + int64* next_id);
|
| +
|
| + bookmarks::BookmarkPermanentNodeList extra_nodes_to_load_;
|
| + std::vector<BookmarkPermanentNode*> extra_nodes_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TestBookmarkClient);
|
| };
|
|
|