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

Unified Diff: components/sync_bookmarks/bookmark_model_associator.cc

Issue 1454983004: Bookmark permanent nodes' visibility is embedder's business. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync_bookmarks/bookmark_model_associator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_bookmarks/bookmark_model_associator.cc
diff --git a/components/sync_bookmarks/bookmark_model_associator.cc b/components/sync_bookmarks/bookmark_model_associator.cc
index 27b5824aa705e7306c6ae1f8954cf85c5c87a414..00bf5afaac8b5c2dff1c33cb77643191db17e76c 100644
--- a/components/sync_bookmarks/bookmark_model_associator.cc
+++ b/components/sync_bookmarks/bookmark_model_associator.cc
@@ -371,26 +371,6 @@ BookmarkModelAssociator::~BookmarkModelAssociator() {
DCHECK(thread_checker_.CalledOnValidThread());
}
-void BookmarkModelAssociator::UpdatePermanentNodeVisibility() {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(bookmark_model_->loaded());
-
- BookmarkNode::Type bookmark_node_types[] = {
- BookmarkNode::BOOKMARK_BAR,
- BookmarkNode::OTHER_NODE,
- BookmarkNode::MOBILE,
- };
- for (size_t i = 0; i < arraysize(bookmark_node_types); ++i) {
- int64 id = bookmark_model_->PermanentNode(bookmark_node_types[i])->id();
- bookmark_model_->SetPermanentNodeVisible(
- bookmark_node_types[i],
- id_map_.find(id) != id_map_.end());
- }
-
- // Note: the root node may have additional extra nodes. Currently their
- // visibility is not affected by sync.
-}
-
syncer::SyncError BookmarkModelAssociator::DisassociateModels() {
id_map_.clear();
id_map_inverse_.clear();
@@ -437,10 +417,6 @@ void BookmarkModelAssociator::Associate(const BookmarkNode* node,
const syncer::BaseNode& sync_node) {
AddAssociation(node, sync_node.GetId());
- // TODO(stanisc): crbug.com/456876: consider not doing this on every single
noyau (Ping after 24h) 2015/11/18 16:49:15 Please add this bug number to the bug description
- // association.
- UpdatePermanentNodeVisibility();
-
// The same check exists in PersistAssociations. However it is better to
// do the check earlier to avoid the cost of decrypting nodes again
// in PersistAssociations.
« no previous file with comments | « components/sync_bookmarks/bookmark_model_associator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698