OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #include "components/bookmarks/managed/managed_bookmark_service.h" | 5 #include "components/bookmarks/managed/managed_bookmark_service.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 !IsDescendantOf(node, supervised_node_); | 141 !IsDescendantOf(node, supervised_node_); |
142 } | 142 } |
143 | 143 |
144 bool ManagedBookmarkService::CanSyncNode(const BookmarkNode* node) { | 144 bool ManagedBookmarkService::CanSyncNode(const BookmarkNode* node) { |
145 return !IsDescendantOf(node, managed_node_) && | 145 return !IsDescendantOf(node, managed_node_) && |
146 !IsDescendantOf(node, supervised_node_); | 146 !IsDescendantOf(node, supervised_node_); |
147 } | 147 } |
148 | 148 |
149 bool ManagedBookmarkService::CanBeEditedByUser(const BookmarkNode* node) { | 149 bool ManagedBookmarkService::CanBeEditedByUser(const BookmarkNode* node) { |
150 return !IsDescendantOf(node, managed_node_) && | 150 return !IsDescendantOf(node, managed_node_) && |
151 !IsDescendantOf(node, supervised_node_); | 151 !IsDescendantOf(node, supervised_node_) && |
152 !bookmark_model_->is_permanent_node(node); | |
Theresa
2017/04/25 15:29:45
sky@ - I moved this check to the Android specific
| |
152 } | 153 } |
153 | 154 |
154 void ManagedBookmarkService::Shutdown() { | 155 void ManagedBookmarkService::Shutdown() { |
155 Cleanup(); | 156 Cleanup(); |
156 } | 157 } |
157 | 158 |
158 void ManagedBookmarkService::BookmarkModelChanged() {} | 159 void ManagedBookmarkService::BookmarkModelChanged() {} |
159 | 160 |
160 void ManagedBookmarkService::BookmarkModelLoaded(BookmarkModel* bookmark_model, | 161 void ManagedBookmarkService::BookmarkModelLoaded(BookmarkModel* bookmark_model, |
161 bool ids_reassigned) { | 162 bool ids_reassigned) { |
(...skipping 18 matching lines...) Expand all Loading... | |
180 } | 181 } |
181 | 182 |
182 managed_bookmarks_tracker_.reset(); | 183 managed_bookmarks_tracker_.reset(); |
183 supervised_bookmarks_tracker_.reset(); | 184 supervised_bookmarks_tracker_.reset(); |
184 | 185 |
185 managed_node_ = nullptr; | 186 managed_node_ = nullptr; |
186 supervised_node_ = nullptr; | 187 supervised_node_ = nullptr; |
187 } | 188 } |
188 | 189 |
189 } // namespace bookmarks | 190 } // namespace bookmarks |
OLD | NEW |