summaryrefslogtreecommitdiffstats
path: root/sync/engine/syncer_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/engine/syncer_util.cc')
-rw-r--r--sync/engine/syncer_util.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc
index c7d93c1..2235734 100644
--- a/sync/engine/syncer_util.cc
+++ b/sync/engine/syncer_util.cc
@@ -12,7 +12,6 @@
#include "base/base64.h"
#include "base/location.h"
#include "base/metrics/histogram.h"
-#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "sync/engine/conflict_resolver.h"
#include "sync/engine/syncer_proto_util.h"
@@ -279,9 +278,7 @@ UpdateAttemptResponse AttemptToUpdateEntry(
std::string GetUniqueBookmarkTagFromUpdate(const sync_pb::SyncEntity& update) {
if (!update.has_originator_cache_guid() ||
!update.has_originator_client_item_id()) {
- LOG(ERROR) << "Update is missing requirements for bookmark position."
- << " This is a server bug.";
- return UniquePosition::RandomSuffix();
+ return std::string();
}
return syncable::GenerateSyncableBookmarkHash(
@@ -298,8 +295,7 @@ UniquePosition GetUpdatePosition(const sync_pb::SyncEntity& update,
} else if (update.has_position_in_parent()) {
return UniquePosition::FromInt64(update.position_in_parent(), suffix);
} else {
- LOG(ERROR) << "No position information in update. This is a server bug.";
- return UniquePosition::FromInt64(0, suffix);
+ return UniquePosition::CreateInvalid();
}
}
@@ -345,6 +341,10 @@ void UpdateBookmarkPositioning(
GetUpdatePosition(update, local_entry->GetUniqueBookmarkTag());
if (update_pos.IsValid()) {
local_entry->PutServerUniquePosition(update_pos);
+ } else {
+ // TODO(sync): This and other cases of unexpected input should be handled
+ // better.
+ NOTREACHED();
}
}