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

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

Issue 2850633004: [USS] implement CreateMetadataChangeList and GetClientTag (Closed)
Patch Set: comments Created 3 years, 7 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
« no previous file with comments | « components/history/core/browser/typed_url_sync_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..40d57d67272767f1a37f1945c92bd6d3f478bab5 100644
--- a/components/history/core/browser/typed_url_sync_bridge.cc
+++ b/components/history/core/browser/typed_url_sync_bridge.cc
@@ -4,15 +4,21 @@
#include "components/history/core/browser/typed_url_sync_bridge.h"
+#include "base/memory/ptr_util.h"
+#include "components/sync/model_impl/sync_metadata_store_change_list.h"
+
namespace history {
TypedURLSyncBridge::TypedURLSyncBridge(
HistoryBackend* history_backend,
+ syncer::SyncMetadataStore* sync_metadata_store,
const ChangeProcessorFactory& change_processor_factory)
: ModelTypeSyncBridge(change_processor_factory, syncer::TYPED_URLS),
- history_backend_(history_backend) {
+ history_backend_(history_backend),
+ sync_metadata_store_(sync_metadata_store) {
DCHECK(history_backend_);
DCHECK(sequence_checker_.CalledOnValidSequence());
+ DCHECK(sync_metadata_store_);
NOTIMPLEMENTED();
}
@@ -24,8 +30,8 @@ TypedURLSyncBridge::~TypedURLSyncBridge() {
std::unique_ptr<syncer::MetadataChangeList>
TypedURLSyncBridge::CreateMetadataChangeList() {
DCHECK(sequence_checker_.CalledOnValidSequence());
- NOTIMPLEMENTED();
- return {};
+ return base::MakeUnique<syncer::SyncMetadataStoreChangeList>(
+ sync_metadata_store_, syncer::TYPED_URLS);
}
base::Optional<syncer::ModelError> TypedURLSyncBridge::MergeSyncData(
@@ -62,8 +68,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
« no previous file with comments | « components/history/core/browser/typed_url_sync_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698