diff --git a/components/brave_sync/client/bookmark_change_processor.cc b/components/brave_sync/client/bookmark_change_processor.cc index c774a02b81bf..f289eda28531 100644 --- a/components/brave_sync/client/bookmark_change_processor.cc +++ b/components/brave_sync/client/bookmark_change_processor.cc @@ -712,14 +712,7 @@ void BookmarkChangeProcessor::GetAllSyncData( resolved_record->first = jslib::SyncRecord::Clone(*record); auto* node = FindByObjectId(bookmark_model_, record->objectId); if (node) { - // only match unsynced nodes so we don't accidentally overwrite - // changes from another client with our local changes - // TODO(darkdh): remove this hack once sync library can diffenrentiate - // records by syncTimstamp - if (IsUnsynced(node) || - record->action != jslib::SyncRecord::Action::A_UPDATE) { resolved_record->second = BookmarkNodeToSyncBookmark(node); - } } records_and_existing_objects->push_back(std::move(resolved_record)); diff --git a/components/brave_sync/client/bookmark_change_processor_unittest.cc b/components/brave_sync/client/bookmark_change_processor_unittest.cc index a078eabc4ef0..d2671e5b1e09 100644 --- a/components/brave_sync/client/bookmark_change_processor_unittest.cc +++ b/components/brave_sync/client/bookmark_change_processor_unittest.cc @@ -739,8 +739,8 @@ TEST_F(BraveBookmarkChangeProcessorTest, GetAllSyncData) { EXPECT_PRED_FORMAT2(AssertSyncRecordsBookmarkEqual, records_to_resolve.at(0).get(), pair_at_0->first.get()); - // UPDATE now can be resolved to nullptr in some cases - EXPECT_EQ(pair_at_0->second.get(), nullptr); + EXPECT_PRED_FORMAT2(AssertSyncRecordsBookmarkEqual, + records.at(1).get(), pair_at_0->second.get()); const auto& pair_at_1 = records_and_existing_objects.at(1); EXPECT_PRED_FORMAT2(AssertSyncRecordsBookmarkEqual,