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

Unified Diff: components/history/core/browser/history_backend.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/history_backend.cc
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
index 2ab8db29706c31618fd98fa350acc6caad45a35c..5c4b7bdb817335310d4161183f81a576ccafa9e9 100644
--- a/components/history/core/browser/history_backend.cc
+++ b/components/history/core/browser/history_backend.cc
@@ -889,6 +889,40 @@ bool HistoryBackend::IsExpiredVisitTime(const base::Time& time) {
return time < expirer_.GetCurrentExpirationTime();
}
+bool HistoryBackend::UpdateSyncMetadata(
+ syncer::ModelType model_type,
+ const std::string& storage_key,
+ const sync_pb::EntityMetadata& metadata) {
+ DCHECK_EQ(model_type, syncer::TYPED_URLS)
+ << "Only the TYPED_URLS model type is supported";
+
+ return db_->UpdateSyncMetadata(storage_key, metadata);
+}
+
+bool HistoryBackend::ClearSyncMetadata(syncer::ModelType model_type,
+ const std::string& storage_key) {
+ DCHECK_EQ(model_type, syncer::TYPED_URLS)
+ << "Only the TYPED_URLS model type is supported";
+
+ return db_->ClearSyncMetadata(storage_key);
+}
+
+bool HistoryBackend::UpdateModelTypeState(
+ syncer::ModelType model_type,
+ const sync_pb::ModelTypeState& model_type_state) {
+ DCHECK_EQ(model_type, syncer::TYPED_URLS)
+ << "Only the TYPED_URLS model type is supported";
+
+ return db_->UpdateModelTypeState(model_type_state);
+}
+
+bool HistoryBackend::ClearModelTypeState(syncer::ModelType model_type) {
+ DCHECK_EQ(model_type, syncer::TYPED_URLS)
+ << "Only the TYPED_URLS model type is supported";
+
+ return db_->ClearModelTypeState();
+}
+
void HistoryBackend::SetPageTitle(const GURL& url,
const base::string16& title) {
if (!db_)

Powered by Google App Engine
This is Rietveld 408576698