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

Unified Diff: chrome/browser/sync/profile_sync_service_bookmark_unittest.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/profile_sync_service_bookmark_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
index 6b07ac6ce251d7c18c4e76b3da6e3b4ef6c530a1..041856779ac4e30986cd66b002e53cd188487142 100644
--- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
@@ -350,7 +350,8 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
// Be sure to call CreatePermanentBookmarkNodes(), otherwise this will fail.
syncer::ReadNode bookmark_bar(trans);
- EXPECT_EQ(BaseNode::INIT_OK, bookmark_bar.InitByTagLookup("bookmark_bar"));
+ EXPECT_EQ(BaseNode::INIT_OK,
+ bookmark_bar.InitByTagLookupForBookmarks("bookmark_bar"));
syncer::WriteNode node(trans);
EXPECT_TRUE(node.InitBookmarkByCreation(bookmark_bar, NULL));
@@ -406,8 +407,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
int GetSyncBookmarkCount() {
syncer::ReadTransaction trans(FROM_HERE, test_user_share_.user_share());
syncer::ReadNode node(&trans);
- if (node.InitByTagLookup(syncer::ModelTypeToRootTag(syncer::BOOKMARKS)) !=
- syncer::BaseNode::INIT_OK)
+ if (node.InitTypeRoot(syncer::BOOKMARKS) != syncer::BaseNode::INIT_OK)
return 0;
return node.GetTotalNodeCount();
}
@@ -424,8 +424,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
uber_root.InitByRootLookup();
syncer::ReadNode root(&trans);
- root_exists = (root.InitByTagLookup(syncer::ModelTypeToRootTag(type)) ==
- BaseNode::INIT_OK);
+ root_exists = (root.InitTypeRoot(type) == BaseNode::INIT_OK);
}
if (!root_exists) {
@@ -440,8 +439,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
};
syncer::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
syncer::ReadNode root(&trans);
- EXPECT_EQ(BaseNode::INIT_OK, root.InitByTagLookup(
- syncer::ModelTypeToRootTag(type)));
+ EXPECT_EQ(BaseNode::INIT_OK, root.InitTypeRoot(type));
// Loop through creating permanent nodes as necessary.
int64 last_child_id = syncer::kInvalidId;
@@ -449,7 +447,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
// First check if the node already exists. This is for tests that involve
// persistence and set up sync more than once.
syncer::ReadNode lookup(&trans);
- if (lookup.InitByTagLookup(permanent_tags[i]) ==
+ if (lookup.InitByTagLookupForBookmarks(permanent_tags[i]) ==
syncer::ReadNode::INIT_OK) {
last_child_id = lookup.GetId();
continue;

Powered by Google App Engine
This is Rietveld 408576698