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

Unified Diff: components/autofill/core/browser/webdata/autofill_table.h

Issue 2794413002: [USS] Add SyncMetadataStore interface (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/autofill/core/browser/webdata/autofill_table.h
diff --git a/components/autofill/core/browser/webdata/autofill_table.h b/components/autofill/core/browser/webdata/autofill_table.h
index 872d127b393bade1cd3d96b71c364c3b8a18dc64..dbb575dfde9f731608997bcdcf758ffc9390fcc0 100644
--- a/components/autofill/core/browser/webdata/autofill_table.h
+++ b/components/autofill/core/browser/webdata/autofill_table.h
@@ -16,6 +16,7 @@
#include "base/strings/string16.h"
#include "components/sync/base/model_type.h"
#include "components/sync/model/metadata_batch.h"
+#include "components/sync/model/metadata_table.h"
#include "components/webdata/common/web_database_table.h"
class WebDatabase;
@@ -249,7 +250,7 @@ struct FormFieldData;
//
// value The serialized ModelTypeState record.
-class AutofillTable : public WebDatabaseTable {
+class AutofillTable : public WebDatabaseTable, public syncer::MetadataTable {
public:
AutofillTable();
~AutofillTable() override;
@@ -426,22 +427,16 @@ class AutofillTable : public WebDatabaseTable {
bool GetAllSyncMetadata(syncer::ModelType model_type,
syncer::MetadataBatch* metadata_batch);
- // Update the metadata row for |model_type|, keyed by |storage_key|, to
- // contain the contents of |metadata|.
+ // syncer::MetadataTable implementation.
bool UpdateSyncMetadata(syncer::ModelType model_type,
const std::string& storage_key,
- const sync_pb::EntityMetadata& metadata);
-
- // Remove the metadata row of type |model_type| keyed by |storage|key|.
+ const sync_pb::EntityMetadata& metadata) override;
bool ClearSyncMetadata(syncer::ModelType model_type,
- const std::string& storage_key);
-
- // Update the stored sync state for the |model_type|.
- bool UpdateModelTypeState(syncer::ModelType model_type,
- const sync_pb::ModelTypeState& model_type_state);
-
- // Clear the stored sync state for |model_type|.
- bool ClearModelTypeState(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;
// Table migration functions. NB: These do not and should not rely on other
// functions in this class. The implementation of a function such as

Powered by Google App Engine
This is Rietveld 408576698