Index: chrome/browser/sync/engine/syncapi.cc |
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc |
index ca11c34ca04c7cb2565682bb68211f5462cbfc21..de00056c7332f38e11e22b3ac06050df4c9f9dae 100644 |
--- a/chrome/browser/sync/engine/syncapi.cc |
+++ b/chrome/browser/sync/engine/syncapi.cc |
@@ -409,13 +409,6 @@ const sync_pb::PasswordSpecificsData& BaseNode::GetPasswordSpecifics() const { |
return *password_data_; |
} |
-const sync_pb::PreferenceSpecifics& BaseNode::GetPreferenceSpecifics() const { |
- DCHECK_EQ(syncable::PREFERENCES, GetModelType()); |
- const sync_pb::EntitySpecifics& unencrypted = |
- GetUnencryptedSpecifics(GetEntry()); |
- return unencrypted.GetExtension(sync_pb::preference); |
-} |
- |
const sync_pb::ThemeSpecifics& BaseNode::GetThemeSpecifics() const { |
DCHECK_EQ(syncable::THEMES, GetModelType()); |
const sync_pb::EntitySpecifics& unencrypted = |
@@ -444,6 +437,12 @@ const sync_pb::SessionSpecifics& BaseNode::GetSessionSpecifics() const { |
return unencrypted.GetExtension(sync_pb::session); |
} |
+const sync_pb::EntitySpecifics& BaseNode::GetEntitySpecifics() const { |
+ const sync_pb::EntitySpecifics& unencrypted = |
+ GetUnencryptedSpecifics(GetEntry()); |
+ return unencrypted; |
+} |
+ |
syncable::ModelType BaseNode::GetModelType() const { |
return GetEntry()->GetModelType(); |
} |
@@ -600,12 +599,6 @@ void WriteNode::SetPasswordSpecifics( |
PutPasswordSpecificsAndMarkForSyncing(new_value); |
} |
-void WriteNode::SetPreferenceSpecifics( |
- const sync_pb::PreferenceSpecifics& new_value) { |
- DCHECK_EQ(syncable::PREFERENCES, GetModelType()); |
- PutPreferenceSpecificsAndMarkForSyncing(new_value); |
-} |
- |
void WriteNode::SetThemeSpecifics( |
const sync_pb::ThemeSpecifics& new_value) { |
DCHECK_EQ(syncable::THEMES, GetModelType()); |
@@ -618,6 +611,17 @@ void WriteNode::SetSessionSpecifics( |
PutSessionSpecificsAndMarkForSyncing(new_value); |
} |
+void WriteNode::SetEntitySpecifics( |
+ const sync_pb::EntitySpecifics& new_value) { |
+ syncable::ModelType specifics_type = |
+ syncable::GetModelTypeFromSpecifics(new_value); |
+ DCHECK_EQ(specifics_type, GetModelType()); |
+ sync_pb::EntitySpecifics entity_specifics; |
+ entity_specifics.CopyFrom(new_value); |
+ EncryptIfNecessary(&entity_specifics); |
+ PutSpecificsAndMarkForSyncing(entity_specifics); |
+} |
+ |
void WriteNode::ResetFromSpecifics() { |
sync_pb::EntitySpecifics new_data; |
new_data.CopyFrom(GetUnencryptedSpecifics(GetEntry())); |
@@ -632,14 +636,6 @@ void WriteNode::PutPasswordSpecificsAndMarkForSyncing( |
PutSpecificsAndMarkForSyncing(entity_specifics); |
} |
-void WriteNode::PutPreferenceSpecificsAndMarkForSyncing( |
- const sync_pb::PreferenceSpecifics& new_value) { |
- sync_pb::EntitySpecifics entity_specifics; |
- entity_specifics.MutableExtension(sync_pb::preference)->CopyFrom(new_value); |
- EncryptIfNecessary(&entity_specifics); |
- PutSpecificsAndMarkForSyncing(entity_specifics); |
-} |
- |
void WriteNode::SetTypedUrlSpecifics( |
const sync_pb::TypedUrlSpecifics& new_value) { |
DCHECK_EQ(syncable::TYPED_URLS, GetModelType()); |