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

Side by Side Diff: components/bookmarks/browser/bookmark_utils.h

Issue 2367533003: Always add bookmarks to the mobile node on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put new method into ifdef Created 4 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
OLDNEW
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Returns the node with |id|, or NULL if there is no node with |id|. 155 // Returns the node with |id|, or NULL if there is no node with |id|.
156 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64_t id); 156 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64_t id);
157 157
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 // Returns the parent to add new nodes to, never returns null (as long as
166 // the model is loaded).
167 const BookmarkNode* GetParentForNewNodes(BookmarkModel* model);
168
165 } // namespace bookmarks 169 } // namespace bookmarks
166 170
167 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ 171 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698