Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: components/history/core/browser/typed_url_sync_bridge.cc

Issue 2850633004: [USS] implement CreateMetadataChangeList and GetClientTag (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/history/core/browser/typed_url_sync_bridge.cc
diff --git a/components/history/core/browser/typed_url_sync_bridge.cc b/components/history/core/browser/typed_url_sync_bridge.cc
index 55712c82cb727b042063a46f805db802777aa636..53d98ac5c4dc58088eeee09ebbf95248e59ba598 100644
--- a/components/history/core/browser/typed_url_sync_bridge.cc
+++ b/components/history/core/browser/typed_url_sync_bridge.cc
@@ -4,6 +4,10 @@
#include "components/history/core/browser/typed_url_sync_bridge.h"
+#include "base/memory/ptr_util.h"
+#include "components/history/core/browser/history_backend.h"
+#include "components/sync/model_impl/sync_metadata_store_change_list.h"
+
namespace history {
TypedURLSyncBridge::TypedURLSyncBridge(
@@ -24,8 +28,8 @@ TypedURLSyncBridge::~TypedURLSyncBridge() {
std::unique_ptr<syncer::MetadataChangeList>
TypedURLSyncBridge::CreateMetadataChangeList() {
DCHECK(sequence_checker_.CalledOnValidSequence());
- NOTIMPLEMENTED();
- return {};
+ return base::MakeUnique<syncer::SyncMetadataStoreChangeList>(
+ history_backend_, syncer::TYPED_URLS);
}
base::Optional<syncer::ModelError> TypedURLSyncBridge::MergeSyncData(
@@ -62,8 +66,10 @@ void TypedURLSyncBridge::GetAllData(DataCallback callback) {
std::string TypedURLSyncBridge::GetClientTag(
const syncer::EntityData& entity_data) {
DCHECK(sequence_checker_.CalledOnValidSequence());
- NOTIMPLEMENTED();
- return std::string();
+ DCHECK(entity_data.specifics.has_typed_url())
+ << "EntityData does not have typed urls specifics.";
+
+ return entity_data.specifics.typed_url().url();
}
// Prefer to use URLRow::id() to uniquely identify entities when coordinating

Powered by Google App Engine
This is Rietveld 408576698