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

Unified Diff: components/history/core/browser/typed_url_sync_metadata_database.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_metadata_database.cc
diff --git a/components/history/core/browser/typed_url_sync_metadata_database.cc b/components/history/core/browser/typed_url_sync_metadata_database.cc
index f0b2ce6ddf35795ceef3f0449fdbe316c368f44b..6cc6d15774694b330dfcdc653bd0cdb7e459caa4 100644
--- a/components/history/core/browser/typed_url_sync_metadata_database.cc
+++ b/components/history/core/browser/typed_url_sync_metadata_database.cc
@@ -48,12 +48,8 @@ bool TypedURLSyncMetadataDatabase::GetAllSyncMetadata(
}
bool TypedURLSyncMetadataDatabase::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";
-
int64_t storage_key_int = 0;
if (!base::StringToInt64(storage_key, &storage_key_int)) {
return false;
@@ -68,11 +64,7 @@ bool TypedURLSyncMetadataDatabase::UpdateSyncMetadata(
}
bool TypedURLSyncMetadataDatabase::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";
-
int64_t storage_key_int = 0;
if (!base::StringToInt64(storage_key, &storage_key_int)) {
return false;
@@ -85,20 +77,14 @@ bool TypedURLSyncMetadataDatabase::ClearSyncMetadata(
}
bool TypedURLSyncMetadataDatabase::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";
DCHECK_GT(GetMetaTable().GetVersionNumber(), 0);
std::string serialized_state = model_type_state.SerializeAsString();
return GetMetaTable().SetValue(kTypedURLModelTypeStateKey, serialized_state);
}
-bool TypedURLSyncMetadataDatabase::ClearModelTypeState(
- syncer::ModelType model_type) {
- DCHECK_EQ(model_type, syncer::TYPED_URLS)
- << "Only the TYPED_URLS model type is supported";
+bool TypedURLSyncMetadataDatabase::ClearModelTypeState() {
DCHECK_GT(GetMetaTable().GetVersionNumber(), 0);
return GetMetaTable().DeleteKey(kTypedURLModelTypeStateKey);
}

Powered by Google App Engine
This is Rietveld 408576698