| Index: chrome/browser/sync/engine/syncapi.cc
|
| diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
|
| index aef26391513b7e4c66bf4bacd9bbe0c262d1f320..d244ac463be609af21bca443098ddb4859ba9b36 100644
|
| --- a/chrome/browser/sync/engine/syncapi.cc
|
| +++ b/chrome/browser/sync/engine/syncapi.cc
|
| @@ -34,6 +34,7 @@
|
| #include "chrome/browser/sync/engine/syncer_thread.h"
|
| #include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
|
| #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
|
| +#include "chrome/browser/sync/protocol/extension_specifics.pb.h"
|
| #include "chrome/browser/sync/protocol/password_specifics.pb.h"
|
| #include "chrome/browser/sync/protocol/preference_specifics.pb.h"
|
| #include "chrome/browser/sync/protocol/service_constants.h"
|
| @@ -268,6 +269,11 @@ const sync_pb::TypedUrlSpecifics& BaseNode::GetTypedUrlSpecifics() const {
|
| return GetEntry()->Get(SPECIFICS).GetExtension(sync_pb::typed_url);
|
| }
|
|
|
| +const sync_pb::ExtensionSpecifics& BaseNode::GetExtensionSpecifics() const {
|
| + DCHECK(GetModelType() == syncable::EXTENSIONS);
|
| + return GetEntry()->Get(SPECIFICS).GetExtension(sync_pb::extension);
|
| +}
|
| +
|
| syncable::ModelType BaseNode::GetModelType() const {
|
| return GetEntry()->GetModelType();
|
| }
|
| @@ -369,6 +375,12 @@ void WriteNode::SetTypedUrlSpecifics(
|
| PutTypedUrlSpecificsAndMarkForSyncing(new_value);
|
| }
|
|
|
| +void WriteNode::SetExtensionSpecifics(
|
| + const sync_pb::ExtensionSpecifics& new_value) {
|
| + DCHECK(GetModelType() == syncable::EXTENSIONS);
|
| + PutExtensionSpecificsAndMarkForSyncing(new_value);
|
| +}
|
| +
|
| void WriteNode::PutThemeSpecificsAndMarkForSyncing(
|
| const sync_pb::ThemeSpecifics& new_value) {
|
| sync_pb::EntitySpecifics entity_specifics;
|
| @@ -383,6 +395,13 @@ void WriteNode::PutTypedUrlSpecificsAndMarkForSyncing(
|
| PutSpecificsAndMarkForSyncing(entity_specifics);
|
| }
|
|
|
| +void WriteNode::PutExtensionSpecificsAndMarkForSyncing(
|
| + const sync_pb::ExtensionSpecifics& new_value) {
|
| + sync_pb::EntitySpecifics entity_specifics;
|
| + entity_specifics.MutableExtension(sync_pb::extension)->CopyFrom(new_value);
|
| + PutSpecificsAndMarkForSyncing(entity_specifics);
|
| +}
|
| +
|
| void WriteNode::PutSpecificsAndMarkForSyncing(
|
| const sync_pb::EntitySpecifics& specifics) {
|
| // Skip redundant changes.
|
|
|