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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 1246063003: Sync: Don't set/use Parent ID for non-hierarchical sync data types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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_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 ae4ecf66dc9d1322da4b7aa225f73cfaa28cd136..629c4516ef323c4d0b1687f09246339a8bf0dae1 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -580,17 +580,12 @@ class ProfileSyncServiceAutofillTest
bool AddAutofillSyncNode(const AutofillEntry& entry) {
syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- syncer::ReadNode autofill_root(&trans);
- if (autofill_root.InitTypeRoot(syncer::AUTOFILL) != BaseNode::INIT_OK) {
- return false;
- }
-
syncer::WriteNode node(&trans);
std::string tag = AutocompleteSyncableService::KeyToTag(
base::UTF16ToUTF8(entry.key().name()),
base::UTF16ToUTF8(entry.key().value()));
syncer::WriteNode::InitUniqueByCreationResult result =
- node.InitUniqueByCreation(syncer::AUTOFILL, autofill_root, tag);
+ node.InitUniqueByCreation(syncer::AUTOFILL, tag);
if (result != syncer::WriteNode::INIT_SUCCESS)
return false;
@@ -602,15 +597,10 @@ class ProfileSyncServiceAutofillTest
bool AddAutofillSyncNode(const AutofillProfile& profile) {
syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- syncer::ReadNode autofill_root(&trans);
- if (autofill_root.InitTypeRoot(AUTOFILL_PROFILE) != BaseNode::INIT_OK) {
- return false;
- }
syncer::WriteNode node(&trans);
std::string tag = profile.guid();
syncer::WriteNode::InitUniqueByCreationResult result =
- node.InitUniqueByCreation(syncer::AUTOFILL_PROFILE,
- autofill_root, tag);
+ node.InitUniqueByCreation(syncer::AUTOFILL_PROFILE, tag);
if (result != syncer::WriteNode::INIT_SUCCESS)
return false;

Powered by Google App Engine
This is Rietveld 408576698