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

Side by Side Diff: components/bookmarks/managed/managed_bookmark_service.cc

Issue 2837643002: [Bookmarks] Remove side drawer and introduce root folder view (Closed)
Patch Set: Changes from dfalcantara@ review Created 3 years, 7 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_) && !node->is_root();
sky 2017/04/24 19:22:25 How about using !is_permanent_node? (on the model)
Theresa 2017/04/24 20:19:10 Done.
152 } 152 }
153 153
154 void ManagedBookmarkService::Shutdown() { 154 void ManagedBookmarkService::Shutdown() {
155 Cleanup(); 155 Cleanup();
156 } 156 }
157 157
158 void ManagedBookmarkService::BookmarkModelChanged() {} 158 void ManagedBookmarkService::BookmarkModelChanged() {}
159 159
160 void ManagedBookmarkService::BookmarkModelLoaded(BookmarkModel* bookmark_model, 160 void ManagedBookmarkService::BookmarkModelLoaded(BookmarkModel* bookmark_model,
161 bool ids_reassigned) { 161 bool ids_reassigned) {
(...skipping 18 matching lines...) Expand all
180 } 180 }
181 181
182 managed_bookmarks_tracker_.reset(); 182 managed_bookmarks_tracker_.reset();
183 supervised_bookmarks_tracker_.reset(); 183 supervised_bookmarks_tracker_.reset();
184 184
185 managed_node_ = nullptr; 185 managed_node_ = nullptr;
186 supervised_node_ = nullptr; 186 supervised_node_ = nullptr;
187 } 187 }
188 188
189 } // namespace bookmarks 189 } // namespace bookmarks
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698