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

Unified Diff: components/sync/model/recording_model_type_change_processor.cc

Issue 2620783002: [sync] Handle local changes in AutocompleteSyncBridge (Closed)
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « components/sync/model/recording_model_type_change_processor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/recording_model_type_change_processor.cc
diff --git a/components/sync/model/recording_model_type_change_processor.cc b/components/sync/model/recording_model_type_change_processor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..13c185047979d6db32cc36d2dfb14e2ab3623d9d
--- /dev/null
+++ b/components/sync/model/recording_model_type_change_processor.cc
@@ -0,0 +1,43 @@
+// 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/sync/model/recording_model_type_change_processor.h"
+
+#include "components/sync/model/fake_model_type_change_processor.h"
+#include "components/sync/model/metadata_batch.h"
+
+namespace syncer {
+
+RecordingModelTypeChangeProcessor::RecordingModelTypeChangeProcessor() {}
+
+RecordingModelTypeChangeProcessor::~RecordingModelTypeChangeProcessor() {}
+
+void RecordingModelTypeChangeProcessor::Put(
+ const std::string& storage_key,
+ std::unique_ptr<EntityData> entity_data,
+ MetadataChangeList* metadata_changes) {
+ put_multimap_.insert(std::make_pair(storage_key, std::move(entity_data)));
+}
+
+void RecordingModelTypeChangeProcessor::Delete(
+ const std::string& storage_key,
+ MetadataChangeList* metadata_changes) {
+ delete_set_.insert(storage_key);
+}
+
+void RecordingModelTypeChangeProcessor::ModelReadyToSync(
+ std::unique_ptr<MetadataBatch> batch) {
+ std::swap(metadata_, batch);
+}
+
+bool RecordingModelTypeChangeProcessor::IsTrackingMetadata() {
+ return is_tracking_metadata_;
+}
+
+void RecordingModelTypeChangeProcessor::SetIsTrackingMetadata(
+ bool is_tracking) {
+ is_tracking_metadata_ = is_tracking;
+}
+
+} // namespace syncer
« no previous file with comments | « components/sync/model/recording_model_type_change_processor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698