OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSION_BOOKMARK_HELPERS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
11 | 11 |
12 // Helper functions. | 12 // Helper functions. |
13 namespace extension_bookmark_helpers { | 13 namespace extension_bookmark_helpers { |
14 | 14 |
15 DictionaryValue* GetNodeDictionary(const BookmarkNode* node, | 15 DictionaryValue* GetNodeDictionary(const BookmarkNode* node, |
16 bool recurse, | 16 bool recurse, |
17 bool only_folders); | 17 bool only_folders); |
18 | 18 |
19 // Add a JSON representation of |node| to the JSON |list|. | 19 // Add a JSON representation of |node| to the JSON |list|. |
20 void AddNode(const BookmarkNode* node, | 20 void AddNode(const BookmarkNode* node, ListValue* list, bool recurse); |
21 ListValue* list, | |
22 bool recurse); | |
23 | 21 |
24 void AddNodeFoldersOnly(const BookmarkNode* node, | 22 void AddNodeFoldersOnly(const BookmarkNode* node, |
25 ListValue* list, | 23 ListValue* list, |
26 bool recurse); | 24 bool recurse); |
27 | 25 |
28 bool RemoveNode(BookmarkModel* model, | 26 bool RemoveNode(BookmarkModel* model, |
29 int64 id, | 27 int64 id, |
30 bool recursive, | 28 bool recursive, |
31 std::string* error); | 29 std::string* error); |
32 | 30 |
33 } | 31 } // namespace extension_bookmark_helpers |
34 | 32 |
35 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_HELPERS_H_ | 33 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ |
OLD | NEW |