summaryrefslogtreecommitdiffstats
path: root/sync/engine
diff options
context:
space:
mode:
Diffstat (limited to 'sync/engine')
-rw-r--r--sync/engine/apply_control_data_updates.cc6
-rw-r--r--sync/engine/apply_control_data_updates_unittest.cc3
-rw-r--r--sync/engine/directory_commit_contribution_unittest.cc10
-rw-r--r--sync/engine/syncer_unittest.cc1
4 files changed, 6 insertions, 14 deletions
diff --git a/sync/engine/apply_control_data_updates.cc b/sync/engine/apply_control_data_updates.cc
index e97741e..9b4b837 100644
--- a/sync/engine/apply_control_data_updates.cc
+++ b/sync/engine/apply_control_data_updates.cc
@@ -17,7 +17,7 @@
namespace syncer {
-using syncable::GET_BY_SERVER_TAG;
+using syncable::GET_TYPE_ROOT;
using syncable::IS_UNAPPLIED_UPDATE;
using syncable::IS_UNSYNCED;
using syncable::SERVER_SPECIFICS;
@@ -39,9 +39,7 @@ void ApplyControlDataUpdates(syncable::Directory* dir) {
ModelTypeSet control_types = ControlTypes();
for (ModelTypeSet::Iterator iter = control_types.First(); iter.Good();
iter.Inc()) {
- syncable::MutableEntry entry(&trans,
- syncable::GET_BY_SERVER_TAG,
- ModelTypeToRootTag(iter.Get()));
+ syncable::MutableEntry entry(&trans, syncable::GET_TYPE_ROOT, iter.Get());
if (!entry.good())
continue;
if (!entry.GetIsUnappliedUpdate())
diff --git a/sync/engine/apply_control_data_updates_unittest.cc b/sync/engine/apply_control_data_updates_unittest.cc
index caacfbc..7248d14 100644
--- a/sync/engine/apply_control_data_updates_unittest.cc
+++ b/sync/engine/apply_control_data_updates_unittest.cc
@@ -188,8 +188,7 @@ TEST_F(ApplyControlDataUpdatesTest, EncryptUnsyncedChanges) {
// Simulate another nigori update that doesn't change anything.
{
syncable::WriteTransaction trans(FROM_HERE, UNITTEST, directory());
- MutableEntry entry(&trans, syncable::GET_BY_SERVER_TAG,
- ModelTypeToRootTag(NIGORI));
+ MutableEntry entry(&trans, syncable::GET_TYPE_ROOT, NIGORI);
ASSERT_TRUE(entry.good());
entry.PutServerVersion(entry_factory_->GetNextRevision());
entry.PutIsUnappliedUpdate(true);
diff --git a/sync/engine/directory_commit_contribution_unittest.cc b/sync/engine/directory_commit_contribution_unittest.cc
index 475985c..b342b54 100644
--- a/sync/engine/directory_commit_contribution_unittest.cc
+++ b/sync/engine/directory_commit_contribution_unittest.cc
@@ -36,10 +36,7 @@ class DirectoryCommitContributionTest : public ::testing::Test {
int64 CreateUnsyncedItem(syncable::WriteTransaction* trans,
ModelType type,
const std::string& tag) {
- syncable::Entry parent_entry(
- trans,
- syncable::GET_BY_SERVER_TAG,
- ModelTypeToRootTag(type));
+ syncable::Entry parent_entry(trans, syncable::GET_TYPE_ROOT, type);
syncable::MutableEntry entry(
trans,
syncable::CREATE,
@@ -53,10 +50,7 @@ class DirectoryCommitContributionTest : public ::testing::Test {
int64 CreateSyncedItem(syncable::WriteTransaction* trans,
ModelType type,
const std::string& tag) {
- syncable::Entry parent_entry(
- trans,
- syncable::GET_BY_SERVER_TAG,
- ModelTypeToRootTag(type));
+ syncable::Entry parent_entry(trans, syncable::GET_TYPE_ROOT, type);
syncable::MutableEntry entry(
trans,
syncable::CREATE,
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index b88feb3..98cde3b 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -86,6 +86,7 @@ using syncable::GET_BY_HANDLE;
using syncable::GET_BY_ID;
using syncable::GET_BY_CLIENT_TAG;
using syncable::GET_BY_SERVER_TAG;
+using syncable::GET_TYPE_ROOT;
using syncable::UNITTEST;
using sessions::MockDebugInfoGetter;