summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync')
-rwxr-xr-xchrome/browser/sync/engine/build_commit_command.cc5
-rwxr-xr-xchrome/browser/sync/engine/syncapi.cc15
2 files changed, 13 insertions, 7 deletions
diff --git a/chrome/browser/sync/engine/build_commit_command.cc b/chrome/browser/sync/engine/build_commit_command.cc
index 1cf0ae6..f1c3d52 100755
--- a/chrome/browser/sync/engine/build_commit_command.cc
+++ b/chrome/browser/sync/engine/build_commit_command.cc
@@ -111,6 +111,11 @@ void BuildCommitCommand::ExecuteImpl(SyncSession* session) {
// We send both because it may aid in logging.
sync_entry->set_non_unique_name(name);
+ if (!meta_entry.Get(syncable::UNIQUE_CLIENT_TAG).empty()) {
+ sync_entry->set_client_defined_unique_tag(
+ meta_entry.Get(syncable::UNIQUE_CLIENT_TAG));
+ }
+
// Deleted items with negative parent ids can be a problem so we set the
// parent to 0. (TODO(sync): Still true in protocol?).
Id new_parent_id;
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index 0fa7362..e34e9d7 100755
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -1524,13 +1524,14 @@ void SyncManager::SyncInternal::HandleCalculateChangesChangeEventFromSyncApi(
syncable::Entry e(event.trans, syncable::GET_BY_HANDLE, id);
DCHECK(e.good());
- if (e.IsRoot()) {
- // Ignore root object, should it ever change.
- continue;
- } else if (e.GetModelType() != syncable::BOOKMARKS) {
- // Ignore non-bookmark objects.
- continue;
- } else if (e.Get(syncable::IS_UNSYNCED)) {
+ syncable::ModelType model_type = e.GetModelType();
+
+ if (e.Get(syncable::IS_UNSYNCED)) {
+ if (model_type == syncable::TOP_LEVEL_FOLDER ||
+ model_type == syncable::UNSPECIFIED) {
+ NOTREACHED() << "Permanent or underspecified item changed via syncapi.";
+ continue;
+ }
// Unsynced items will cause us to nudge the the syncer.
exists_unsynced_items = true;
}