1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/bookmarks/managed/managed_bookmark_util.h"
7 #include "components/bookmarks/browser/bookmark_node.h"
8 #include "components/bookmarks/managed/managed_bookmark_service.h"
12 bool IsPermanentNode(const BookmarkPermanentNode
* node
,
13 ManagedBookmarkService
* managed_bookmark_service
) {
14 BookmarkNode::Type type
= node
->type();
15 if (type
== BookmarkNode::BOOKMARK_BAR
||
16 type
== BookmarkNode::OTHER_NODE
||
17 type
== BookmarkNode::MOBILE
) {
21 return IsManagedNode(node
, managed_bookmark_service
);
24 bool IsManagedNode(const BookmarkPermanentNode
* node
,
25 ManagedBookmarkService
* managed_bookmark_service
) {
26 if (!managed_bookmark_service
)
29 return node
== managed_bookmark_service
->managed_node() ||
30 node
== managed_bookmark_service
->supervised_node();
33 } // namespace bookmarks