Index: sync/internal_api/sync_encryption_handler_impl_unittest.cc |
diff --git a/sync/internal_api/sync_encryption_handler_impl_unittest.cc b/sync/internal_api/sync_encryption_handler_impl_unittest.cc |
index 65fc96408d15b7bc2404a1c3150584d40067361a..59934ba53762d51504bb6df109ea0f71edea5374 100644 |
--- a/sync/internal_api/sync_encryption_handler_impl_unittest.cc |
+++ b/sync/internal_api/sync_encryption_handler_impl_unittest.cc |
@@ -69,7 +69,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test { |
virtual void SetUp() { |
test_user_share_.SetUp(); |
SetUpEncryption(); |
- CreateRootForType(NIGORI); |
+ TestUserShare::CreateRoot(NIGORI, user_share()); |
} |
virtual void TearDown() { |
@@ -86,30 +86,6 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test { |
encryption_handler_->AddObserver(&observer_); |
} |
- void CreateRootForType(ModelType model_type) { |
- syncer::syncable::Directory* directory = user_share()->directory.get(); |
- |
- std::string tag_name = ModelTypeToRootTag(model_type); |
- |
- syncable::WriteTransaction wtrans(FROM_HERE, syncable::UNITTEST, directory); |
- syncable::MutableEntry node(&wtrans, |
- syncable::CREATE, |
- wtrans.root_id(), |
- tag_name); |
- node.Put(syncable::UNIQUE_SERVER_TAG, tag_name); |
- node.Put(syncable::IS_DIR, true); |
- node.Put(syncable::SERVER_IS_DIR, false); |
- node.Put(syncable::IS_UNSYNCED, false); |
- node.Put(syncable::IS_UNAPPLIED_UPDATE, false); |
- node.Put(syncable::SERVER_VERSION, 20); |
- node.Put(syncable::BASE_VERSION, 20); |
- node.Put(syncable::IS_DEL, false); |
- node.Put(syncable::ID, ids_.MakeServer(tag_name)); |
- sync_pb::EntitySpecifics specifics; |
- syncer::AddDefaultFieldValue(model_type, &specifics); |
- node.Put(syncable::SPECIFICS, specifics); |
- } |
- |
void PumpLoop() { |
message_loop_.RunUntilIdle(); |
} |