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

Side by Side Diff: components/bookmarks/test/test_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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_ 5 #ifndef COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_
6 #define COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_ 6 #define COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "components/bookmarks/browser/bookmark_client.h" 9 #include "components/bookmarks/browser/bookmark_client.h"
10 10
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 // Returns true if |node| is one of the |extra_nodes_|. 33 // Returns true if |node| is one of the |extra_nodes_|.
34 bool IsExtraNodeRoot(const BookmarkNode* node); 34 bool IsExtraNodeRoot(const BookmarkNode* node);
35 35
36 // Returns true if |node| belongs to the tree of one of the |extra_nodes_|. 36 // Returns true if |node| belongs to the tree of one of the |extra_nodes_|.
37 bool IsAnExtraNode(const BookmarkNode* node); 37 bool IsAnExtraNode(const BookmarkNode* node);
38 38
39 private: 39 private:
40 // BookmarkClient: 40 // BookmarkClient:
41 bool IsPermanentNodeVisible(const BookmarkPermanentNode* node) override;
42 void RecordAction(const base::UserMetricsAction& action) override; 41 void RecordAction(const base::UserMetricsAction& action) override;
43 LoadExtraCallback GetLoadExtraNodesCallback() override; 42 LoadExtraCallback GetLoadExtraNodesCallback(
44 bool CanSetPermanentNodeTitle(const BookmarkNode* permanent_node) override; 43 scoped_ptr<BookmarkPermanentNode> managed_node,
45 bool CanSyncNode(const BookmarkNode* node) override; 44 scoped_ptr<BookmarkPermanentNode> supervised_node,
46 bool CanBeEditedByUser(const BookmarkNode* node) override; 45 const ExtraNodeLoadedCallback& callback) override;
46 void DoneLoading(BookmarkPermanentNode* managed_node,
47 BookmarkPermanentNode* supervised_node) override;
47 48
48 // Helpers for GetLoadExtraNodesCallback(). 49 // Helpers for GetLoadExtraNodesCallback().
49 static BookmarkPermanentNodeList LoadExtraNodes( 50 static BookmarkPermanentNodeList LoadExtraNodes(
50 BookmarkPermanentNodeList extra_nodes, 51 BookmarkPermanentNodeList extra_nodes,
51 int64* next_id); 52 int64* next_id);
52 53
53 BookmarkPermanentNodeList extra_nodes_to_load_; 54 BookmarkPermanentNodeList extra_nodes_to_load_;
54 std::vector<BookmarkPermanentNode*> extra_nodes_; 55 std::vector<BookmarkPermanentNode*> extra_nodes_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(TestBookmarkClient); 57 DISALLOW_COPY_AND_ASSIGN(TestBookmarkClient);
57 }; 58 };
58 59
59 } // namespace bookmarks 60 } // namespace bookmarks
60 61
61 #endif // COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_ 62 #endif // COMPONENTS_BOOKMARKS_TEST_TEST_BOOKMARK_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698