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

Unified Diff: sync/internal_api/public/simple_metadata_change_list.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « sync/internal_api/public/shutdown_reason.h ('k') | sync/internal_api/public/simple_metadata_change_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/simple_metadata_change_list.h
diff --git a/sync/internal_api/public/simple_metadata_change_list.h b/sync/internal_api/public/simple_metadata_change_list.h
deleted file mode 100644
index 798fb0774773a2e6a758db3d582b05be49832e0d..0000000000000000000000000000000000000000
--- a/sync/internal_api/public/simple_metadata_change_list.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2015 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.
-
-#ifndef SYNC_INTERNAL_API_PUBLIC_SIMPLE_METADATA_CHANGE_LIST_H_
-#define SYNC_INTERNAL_API_PUBLIC_SIMPLE_METADATA_CHANGE_LIST_H_
-
-#include <map>
-#include <string>
-
-#include "sync/api/metadata_change_list.h"
-#include "sync/api/model_type_store.h"
-#include "sync/base/sync_export.h"
-#include "sync/internal_api/public/non_blocking_sync_common.h"
-#include "sync/protocol/data_type_state.pb.h"
-#include "sync/protocol/entity_metadata.pb.h"
-
-namespace syncer_v2 {
-
-// A MetadataChangeList implementation that is meant to be used in combination
-// with a ModelTypeStore. It accumulates changes in member fields, and then when
-// requested transfers them to the store/write batch.
-class SYNC_EXPORT SimpleMetadataChangeList : public MetadataChangeList {
- public:
- enum ChangeType { UPDATE, CLEAR };
-
- struct MetadataChange {
- ChangeType type;
- sync_pb::EntityMetadata metadata;
- };
-
- struct DataTypeStateChange {
- ChangeType type;
- sync_pb::DataTypeState state;
- };
-
- typedef std::map<std::string, MetadataChange> MetadataChanges;
-
- SimpleMetadataChangeList();
- ~SimpleMetadataChangeList() override;
-
- void UpdateDataTypeState(
- const sync_pb::DataTypeState& data_type_state) override;
- void ClearDataTypeState() override;
- void UpdateMetadata(const std::string& client_tag,
- const sync_pb::EntityMetadata& metadata) override;
- void ClearMetadata(const std::string& client_tag) override;
-
- const MetadataChanges& GetMetadataChanges() const;
- bool HasDataTypeStateChange() const;
- const DataTypeStateChange& GetDataTypeStateChange() const;
-
- // Moves all currently accumulated changes into the write batch, clear out
- // local copies. Calling this multiple times will work, but should not be
- // necessary.
- void TransferChanges(ModelTypeStore* store,
- ModelTypeStore::WriteBatch* write_batch);
-
- private:
- MetadataChanges metadata_changes_;
- std::unique_ptr<DataTypeStateChange> state_change_;
-};
-
-} // namespace syncer_v2
-
-#endif // SYNC_INTERNAL_API_PUBLIC_SIMPLE_METADATA_CHANGE_LIST_H_
« no previous file with comments | « sync/internal_api/public/shutdown_reason.h ('k') | sync/internal_api/public/simple_metadata_change_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698