OLD | NEW |
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_BROWSER_BOOKMARK_UTILS_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ |
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 class BookmarkClient; | 30 class BookmarkClient; |
31 class BookmarkModel; | 31 class BookmarkModel; |
32 class BookmarkNode; | 32 class BookmarkNode; |
33 | 33 |
34 // Fields to use when finding matching bookmarks. | 34 // Fields to use when finding matching bookmarks. |
35 struct QueryFields { | 35 struct QueryFields { |
36 QueryFields(); | 36 QueryFields(); |
37 ~QueryFields(); | 37 ~QueryFields(); |
38 | 38 |
39 scoped_ptr<base::string16> word_phrase_query; | 39 std::unique_ptr<base::string16> word_phrase_query; |
40 scoped_ptr<base::string16> url; | 40 std::unique_ptr<base::string16> url; |
41 scoped_ptr<base::string16> title; | 41 std::unique_ptr<base::string16> title; |
42 }; | 42 }; |
43 | 43 |
44 // Clones bookmark node, adding newly created nodes to |parent| starting at | 44 // Clones bookmark node, adding newly created nodes to |parent| starting at |
45 // |index_to_add_at|. If |reset_node_times| is true cloned bookmarks and | 45 // |index_to_add_at|. If |reset_node_times| is true cloned bookmarks and |
46 // folders will receive new creation times and folder modification times | 46 // folders will receive new creation times and folder modification times |
47 // instead of using the values stored in |elements|. | 47 // instead of using the values stored in |elements|. |
48 void CloneBookmarkNode(BookmarkModel* model, | 48 void CloneBookmarkNode(BookmarkModel* model, |
49 const std::vector<BookmarkNodeData::Element>& elements, | 49 const std::vector<BookmarkNodeData::Element>& elements, |
50 const BookmarkNode* parent, | 50 const BookmarkNode* parent, |
51 int index_to_add_at, | 51 int index_to_add_at, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Returns true if |node| is a descendant of |root|. | 158 // Returns true if |node| is a descendant of |root|. |
159 bool IsDescendantOf(const BookmarkNode* node, const BookmarkNode* root); | 159 bool IsDescendantOf(const BookmarkNode* node, const BookmarkNode* root); |
160 | 160 |
161 // Returns true if any node in |list| is a descendant of |root|. | 161 // Returns true if any node in |list| is a descendant of |root|. |
162 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list, | 162 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list, |
163 const BookmarkNode* root); | 163 const BookmarkNode* root); |
164 | 164 |
165 } // namespace bookmarks | 165 } // namespace bookmarks |
166 | 166 |
167 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ | 167 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ |
OLD | NEW |