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

Unified Diff: components/sync/model_impl/on_disk_metadata_change_list.cc

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/sync/model_impl/on_disk_metadata_change_list.cc
diff --git a/components/autofill/core/browser/webdata/autofill_metadata_change_list.cc b/components/sync/model_impl/on_disk_metadata_change_list.cc
similarity index 58%
rename from components/autofill/core/browser/webdata/autofill_metadata_change_list.cc
rename to components/sync/model_impl/on_disk_metadata_change_list.cc
index 24876e4a0cff1b7dd51b5dec518717e20ec9dae8..0f25708fcdfea941583b93a8e338ce30f657223b 100644
--- a/components/autofill/core/browser/webdata/autofill_metadata_change_list.cc
+++ b/components/sync/model_impl/on_disk_metadata_change_list.cc
@@ -1,29 +1,27 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/autofill/core/browser/webdata/autofill_metadata_change_list.h"
+#include "components/sync/model_impl/on_disk_metadata_change_list.h"
#include "base/location.h"
using base::Optional;
using syncer::ModelError;
-namespace autofill {
+namespace syncer {
-AutofillMetadataChangeList::AutofillMetadataChangeList(AutofillTable* table,
- syncer::ModelType type)
+OnDiskMetadataChangeList::OnDiskMetadataChangeList(MetadataTable* table,
+ syncer::ModelType type)
: table_(table), type_(type) {
DCHECK(table_);
- // This should be changed as new autofill types are converted to USS.
- DCHECK_EQ(syncer::AUTOFILL, type_);
}
-AutofillMetadataChangeList::~AutofillMetadataChangeList() {
+OnDiskMetadataChangeList::~OnDiskMetadataChangeList() {
DCHECK(!error_);
}
-void AutofillMetadataChangeList::UpdateModelTypeState(
+void OnDiskMetadataChangeList::UpdateModelTypeState(
const sync_pb::ModelTypeState& model_type_state) {
if (error_) {
return;
@@ -34,7 +32,7 @@ void AutofillMetadataChangeList::UpdateModelTypeState(
}
}
-void AutofillMetadataChangeList::ClearModelTypeState() {
+void OnDiskMetadataChangeList::ClearModelTypeState() {
if (error_) {
return;
}
@@ -44,7 +42,7 @@ void AutofillMetadataChangeList::ClearModelTypeState() {
}
}
-void AutofillMetadataChangeList::UpdateMetadata(
+void OnDiskMetadataChangeList::UpdateMetadata(
const std::string& storage_key,
const sync_pb::EntityMetadata& metadata) {
if (error_) {
@@ -56,7 +54,7 @@ void AutofillMetadataChangeList::UpdateMetadata(
}
}
-void AutofillMetadataChangeList::ClearMetadata(const std::string& storage_key) {
+void OnDiskMetadataChangeList::ClearMetadata(const std::string& storage_key) {
if (error_) {
return;
}
@@ -66,10 +64,10 @@ void AutofillMetadataChangeList::ClearMetadata(const std::string& storage_key) {
}
}
-Optional<ModelError> AutofillMetadataChangeList::TakeError() {
+Optional<ModelError> OnDiskMetadataChangeList::TakeError() {
Optional<ModelError> temp = error_;
error_.reset();
return temp;
}
-} // namespace autofill
+} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698