| 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 <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 class BookmarkModel; | 13 class BookmarkModel; |
| 14 class BookmarkNode; | 14 class BookmarkNode; |
| 15 |
| 16 namespace base { |
| 15 class DictionaryValue; | 17 class DictionaryValue; |
| 16 class ListValue; | 18 class ListValue; |
| 19 } |
| 17 | 20 |
| 18 // Helper functions. | 21 // Helper functions. |
| 19 namespace extension_bookmark_helpers { | 22 namespace extension_bookmark_helpers { |
| 20 | 23 |
| 21 DictionaryValue* GetNodeDictionary(const BookmarkNode* node, | 24 base::DictionaryValue* GetNodeDictionary(const BookmarkNode* node, |
| 22 bool recurse, | 25 bool recurse, |
| 23 bool only_folders); | 26 bool only_folders); |
| 24 | 27 |
| 25 // Add a JSON representation of |node| to the JSON |list|. | 28 // Add a JSON representation of |node| to the JSON |list|. |
| 26 void AddNode(const BookmarkNode* node, ListValue* list, bool recurse); | 29 void AddNode(const BookmarkNode* node, base::ListValue* list, bool recurse); |
| 27 | 30 |
| 28 void AddNodeFoldersOnly(const BookmarkNode* node, | 31 void AddNodeFoldersOnly(const BookmarkNode* node, |
| 29 ListValue* list, | 32 base::ListValue* list, |
| 30 bool recurse); | 33 bool recurse); |
| 31 | 34 |
| 32 bool RemoveNode(BookmarkModel* model, | 35 bool RemoveNode(BookmarkModel* model, |
| 33 int64 id, | 36 int64 id, |
| 34 bool recursive, | 37 bool recursive, |
| 35 std::string* error); | 38 std::string* error); |
| 36 | 39 |
| 37 } // namespace extension_bookmark_helpers | 40 } // namespace extension_bookmark_helpers |
| 38 | 41 |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ | 42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ |
| OLD | NEW |