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

Side by Side Diff: chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.h

Issue 308273002: Made the bookmarks extension APIs aware of managed bookmarks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARK_API_HELPERS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARK_API_HELPERS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARK_API_HELPERS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARK_API_HELPERS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/common/extensions/api/bookmarks.h" 12 #include "chrome/common/extensions/api/bookmarks.h"
13 13
14 class BookmarkModel; 14 class BookmarkModel;
15 class BookmarkNode; 15 class BookmarkNode;
16 class ChromeBookmarkClient;
16 17
17 // Helper functions. 18 // Helper functions.
18 namespace extensions { 19 namespace extensions {
19 namespace bookmark_api_helpers { 20 namespace bookmark_api_helpers {
20 21
21 // The returned value is owned by the caller. 22 // The returned value is owned by the caller.
22 api::bookmarks::BookmarkTreeNode* GetBookmarkTreeNode( 23 api::bookmarks::BookmarkTreeNode* GetBookmarkTreeNode(
23 const BookmarkNode* node, 24 const BookmarkNode* node,
24 bool recurse, 25 bool recurse,
25 bool only_folders); 26 bool only_folders);
26 27
27 // Add a JSON representation of |node| to the JSON |nodes|. 28 // Add a JSON representation of |node| to the JSON |nodes|.
28 void AddNode(const BookmarkNode* node, 29 void AddNode(const BookmarkNode* node,
29 std::vector<linked_ptr<api::bookmarks::BookmarkTreeNode> >* nodes, 30 std::vector<linked_ptr<api::bookmarks::BookmarkTreeNode> >* nodes,
30 bool recurse); 31 bool recurse);
31 32
32 void AddNodeFoldersOnly(const BookmarkNode* node, 33 void AddNodeFoldersOnly(const BookmarkNode* node,
33 std::vector<linked_ptr< 34 std::vector<linked_ptr<
34 api::bookmarks::BookmarkTreeNode> >* nodes, 35 api::bookmarks::BookmarkTreeNode> >* nodes,
35 bool recurse); 36 bool recurse);
36 37
37 bool RemoveNode(BookmarkModel* model, 38 bool RemoveNode(ChromeBookmarkClient* client,
38 int64 id, 39 int64 id,
39 bool recursive, 40 bool recursive,
40 std::string* error); 41 std::string* error);
41 42
42 } // namespace bookmark_api_helpers 43 } // namespace bookmark_api_helpers
43 } // namespace extensions 44 } // namespace extensions
44 45
45 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARK_API_HELPERS_H_ 46 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARK_API_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698