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

Unified Diff: chrome/browser/sync/glue/bookmark_model_associator.cc

Issue 302173004: sync: Specialize functions that fetch type root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GET_BY_SERVER_TAG_DEPRECATED/GET_BY_SERVER_TAG/ Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/bookmark_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index ab29bac17799a204db8ef623ffd3e5a2cc989e08..ede4307e9f026356ac1ae998b09b99fa30718992 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -387,7 +387,8 @@ bool BookmarkModelAssociator::GetSyncIdForTaggedNode(const std::string& tag,
int64* sync_id) {
syncer::ReadTransaction trans(FROM_HERE, user_share_);
syncer::ReadNode sync_node(&trans);
- if (sync_node.InitByTagLookup(tag.c_str()) != syncer::BaseNode::INIT_OK)
+ if (sync_node.InitByTagLookupForBookmarks(
+ tag.c_str()) != syncer::BaseNode::INIT_OK)
return false;
*sync_id = sync_node.GetId();
return true;
@@ -484,8 +485,7 @@ syncer::SyncError BookmarkModelAssociator::BuildAssociations(
syncer::WriteTransaction trans(FROM_HERE, user_share_);
syncer::ReadNode bm_root(&trans);
- if (bm_root.InitByTagLookup(syncer::ModelTypeToRootTag(syncer::BOOKMARKS)) ==
- syncer::BaseNode::INIT_OK) {
+ if (bm_root.InitTypeRoot(syncer::BOOKMARKS) == syncer::BaseNode::INIT_OK) {
syncer_merge_result->set_num_items_before_association(
bm_root.GetTotalNodeCount());
}
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.cc ('k') | chrome/browser/sync/glue/synced_device_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698