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

Unified Diff: components/history/core/browser/typed_url_sync_metadata_database.h

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.h
diff --git a/components/history/core/browser/typed_url_sync_metadata_database.h b/components/history/core/browser/typed_url_sync_metadata_database.h
index 6967f48642d88e61e4162faca3e1b587b91dc9f2..0b687539c288ea57166f619ae5572fea2aa16251 100644
--- a/components/history/core/browser/typed_url_sync_metadata_database.h
+++ b/components/history/core/browser/typed_url_sync_metadata_database.h
@@ -8,7 +8,6 @@
#include "base/macros.h"
#include "components/sync/base/model_type.h"
#include "components/sync/model/metadata_batch.h"
-#include "components/sync/model/sync_metadata_store.h"
#include "sql/meta_table.h"
namespace sql {
@@ -21,27 +20,30 @@ namespace history {
// and datatype state table. Entity metadata table contains metadata(sync
// states) for each url. Datatype state table contains the state of typed url
// datatype.
-class TypedURLSyncMetadataDatabase : public syncer::SyncMetadataStore {
+class TypedURLSyncMetadataDatabase {
public:
// Must call InitVisitTable() before using to make sure the database is
// initialized.
TypedURLSyncMetadataDatabase();
- ~TypedURLSyncMetadataDatabase() override;
+ virtual ~TypedURLSyncMetadataDatabase();
// Read all the stored metadata for typed URL and fill |metadata_batch|
// with it.
bool GetAllSyncMetadata(syncer::MetadataBatch* metadata_batch);
- // syncer::SyncMetadataStore implementation.
- bool UpdateSyncMetadata(syncer::ModelType model_type,
- const std::string& storage_key,
- const sync_pb::EntityMetadata& metadata) override;
- bool ClearSyncMetadata(syncer::ModelType model_type,
- const std::string& storage_key) override;
- bool UpdateModelTypeState(
- syncer::ModelType model_type,
- const sync_pb::ModelTypeState& model_type_state) override;
- bool ClearModelTypeState(syncer::ModelType model_type) override;
+ // Update the metadata row for typed URL, keyed by |storage_key|, to
+ // contain the contents of |metadata|.
+ bool UpdateSyncMetadata(const std::string& storage_key,
+ const sync_pb::EntityMetadata& metadata);
+
+ // Remove the metadata row of typed URL keyed by |storage_key|.
+ bool ClearSyncMetadata(const std::string& storage_key);
+
+ // Update the stored sync state for the typed URL.
+ bool UpdateModelTypeState(const sync_pb::ModelTypeState& model_type_state);
+
+ // Clear the stored sync state for typed URL.
+ bool ClearModelTypeState();
protected:
// Returns the database for the functions in this interface.

Powered by Google App Engine
This is Rietveld 408576698