| Index: chrome/browser/sync/profile_sync_service_autofill_unittest.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
|
| index 7567f654e9dc3ad485f10d01d394fa897163450e..adac26c68c38afe44545f33c58922cd107857fe7 100644
|
| --- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
|
| @@ -84,10 +84,11 @@ using browser_sync::AutofillProfileDataTypeController;
|
| using browser_sync::DataTypeController;
|
| using content::BrowserThread;
|
| using syncer::AUTOFILL;
|
| +using syncer::AUTOFILL_PROFILE;
|
| using syncer::BaseNode;
|
| using syncer::syncable::BASE_VERSION;
|
| using syncer::syncable::CREATE;
|
| -using syncer::syncable::GET_BY_SERVER_TAG;
|
| +using syncer::syncable::GET_TYPE_ROOT;
|
| using syncer::syncable::MutableEntry;
|
| using syncer::syncable::SERVER_SPECIFICS;
|
| using syncer::syncable::SPECIFICS;
|
| @@ -527,8 +528,7 @@ class ProfileSyncServiceAutofillTest
|
| int GetSyncCount(syncer::ModelType type) {
|
| syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
|
| syncer::ReadNode node(&trans);
|
| - if (node.InitByTagLookup(syncer::ModelTypeToRootTag(type)) !=
|
| - syncer::BaseNode::INIT_OK)
|
| + if (node.InitTypeRoot(type) != syncer::BaseNode::INIT_OK)
|
| return 0;
|
| return node.GetTotalNodeCount() - 1;
|
| }
|
| @@ -581,9 +581,7 @@ class ProfileSyncServiceAutofillTest
|
| bool AddAutofillSyncNode(const AutofillEntry& entry) {
|
| syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
|
| syncer::ReadNode autofill_root(&trans);
|
| - if (autofill_root.InitByTagLookup(
|
| - syncer::ModelTypeToRootTag(syncer::AUTOFILL)) !=
|
| - BaseNode::INIT_OK) {
|
| + if (autofill_root.InitTypeRoot(syncer::AUTOFILL) != BaseNode::INIT_OK) {
|
| return false;
|
| }
|
|
|
| @@ -607,8 +605,7 @@ class ProfileSyncServiceAutofillTest
|
| bool AddAutofillSyncNode(const AutofillProfile& profile) {
|
| syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
|
| syncer::ReadNode autofill_root(&trans);
|
| - if (autofill_root.InitByTagLookup(autofill::kAutofillProfileTag) !=
|
| - BaseNode::INIT_OK) {
|
| + if (autofill_root.InitTypeRoot(AUTOFILL_PROFILE) != BaseNode::INIT_OK) {
|
| return false;
|
| }
|
| syncer::WriteNode node(&trans);
|
| @@ -631,9 +628,7 @@ class ProfileSyncServiceAutofillTest
|
| std::vector<AutofillProfile>* profiles) {
|
| syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
|
| syncer::ReadNode autofill_root(&trans);
|
| - if (autofill_root.InitByTagLookup(
|
| - syncer::ModelTypeToRootTag(syncer::AUTOFILL)) !=
|
| - BaseNode::INIT_OK) {
|
| + if (autofill_root.InitTypeRoot(syncer::AUTOFILL) != BaseNode::INIT_OK) {
|
| return false;
|
| }
|
|
|
| @@ -672,8 +667,7 @@ class ProfileSyncServiceAutofillTest
|
| std::vector<AutofillProfile>* profiles) {
|
| syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
|
| syncer::ReadNode autofill_root(&trans);
|
| - if (autofill_root.InitByTagLookup(autofill::kAutofillProfileTag) !=
|
| - BaseNode::INIT_OK) {
|
| + if (autofill_root.InitTypeRoot(AUTOFILL_PROFILE) != BaseNode::INIT_OK) {
|
| return false;
|
| }
|
|
|
| @@ -837,8 +831,7 @@ class FakeServerUpdater : public base::RefCountedThreadSafe<FakeServerUpdater> {
|
|
|
| // Create actual entry based on autofill protobuf information.
|
| // Simulates effects of UpdateLocalDataFromServerData
|
| - MutableEntry parent(&trans, GET_BY_SERVER_TAG,
|
| - syncer::ModelTypeToRootTag(syncer::AUTOFILL));
|
| + MutableEntry parent(&trans, GET_TYPE_ROOT, syncer::AUTOFILL);
|
| MutableEntry item(&trans, CREATE, syncer::AUTOFILL, parent.GetId(), tag);
|
| ASSERT_TRUE(item.good());
|
| item.PutSpecifics(entity_specifics);
|
|
|