OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/sync/api/metadata_batch.h" | 5 #include "components/sync/model/metadata_batch.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 namespace syncer { | 9 namespace syncer { |
10 | 10 |
11 MetadataBatch::MetadataBatch() {} | 11 MetadataBatch::MetadataBatch() {} |
12 MetadataBatch::~MetadataBatch() {} | 12 MetadataBatch::~MetadataBatch() {} |
13 | 13 |
14 EntityMetadataMap&& MetadataBatch::TakeAllMetadata() { | 14 EntityMetadataMap&& MetadataBatch::TakeAllMetadata() { |
15 return std::move(metadata_map_); | 15 return std::move(metadata_map_); |
16 } | 16 } |
17 | 17 |
18 void MetadataBatch::AddMetadata(const std::string& storage_key, | 18 void MetadataBatch::AddMetadata(const std::string& storage_key, |
19 const sync_pb::EntityMetadata& metadata) { | 19 const sync_pb::EntityMetadata& metadata) { |
20 metadata_map_.insert(std::make_pair(storage_key, metadata)); | 20 metadata_map_.insert(std::make_pair(storage_key, metadata)); |
21 } | 21 } |
22 | 22 |
23 const sync_pb::ModelTypeState& MetadataBatch::GetModelTypeState() const { | 23 const sync_pb::ModelTypeState& MetadataBatch::GetModelTypeState() const { |
24 return state_; | 24 return state_; |
25 } | 25 } |
26 | 26 |
27 void MetadataBatch::SetModelTypeState(const sync_pb::ModelTypeState& state) { | 27 void MetadataBatch::SetModelTypeState(const sync_pb::ModelTypeState& state) { |
28 state_ = state; | 28 state_ = state; |
29 } | 29 } |
30 | 30 |
31 } // namespace syncer | 31 } // namespace syncer |
OLD | NEW |