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

Side by Side Diff: chrome/browser/bookmarks/bookmark_extension_helpers.h

Issue 8394001: Fixed leak in ExtensionBookmarksTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_extension_helpers_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BOOKMARKS_BOOKMARK_EXTENSION_HELPERS_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_HELPERS_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_HELPERS_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_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 15
16 namespace base { 16 namespace base {
17 class DictionaryValue; 17 class DictionaryValue;
18 class ListValue; 18 class ListValue;
19 } 19 }
20 20
21 // Helper functions. 21 // Helper functions.
22 namespace bookmark_extension_helpers { 22 namespace bookmark_extension_helpers {
23 23
24 // The returned value is owned by the caller.
24 base::DictionaryValue* GetNodeDictionary(const BookmarkNode* node, 25 base::DictionaryValue* GetNodeDictionary(const BookmarkNode* node,
25 bool recurse, 26 bool recurse,
26 bool only_folders); 27 bool only_folders);
27 28
28 // Add a JSON representation of |node| to the JSON |list|. 29 // Add a JSON representation of |node| to the JSON |list|.
29 void AddNode(const BookmarkNode* node, base::ListValue* list, bool recurse); 30 void AddNode(const BookmarkNode* node, base::ListValue* list, bool recurse);
30 31
31 void AddNodeFoldersOnly(const BookmarkNode* node, 32 void AddNodeFoldersOnly(const BookmarkNode* node,
32 base::ListValue* list, 33 base::ListValue* list,
33 bool recurse); 34 bool recurse);
34 35
35 bool RemoveNode(BookmarkModel* model, 36 bool RemoveNode(BookmarkModel* model,
36 int64 id, 37 int64 id,
37 bool recursive, 38 bool recursive,
38 std::string* error); 39 std::string* error);
39 40
40 } // namespace bookmark_extension_helpers 41 } // namespace bookmark_extension_helpers
41 42
42 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_HELPERS_H_ 43 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_HELPERS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_extension_helpers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698