| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/sync/api/metadata_batch.h" | |
| 6 | |
| 7 #include <utility> | |
| 8 | |
| 9 namespace syncer { | |
| 10 | |
| 11 MetadataBatch::MetadataBatch() {} | |
| 12 MetadataBatch::~MetadataBatch() {} | |
| 13 | |
| 14 EntityMetadataMap&& MetadataBatch::TakeAllMetadata() { | |
| 15 return std::move(metadata_map_); | |
| 16 } | |
| 17 | |
| 18 void MetadataBatch::AddMetadata(const std::string& storage_key, | |
| 19 const sync_pb::EntityMetadata& metadata) { | |
| 20 metadata_map_.insert(std::make_pair(storage_key, metadata)); | |
| 21 } | |
| 22 | |
| 23 const sync_pb::ModelTypeState& MetadataBatch::GetModelTypeState() const { | |
| 24 return state_; | |
| 25 } | |
| 26 | |
| 27 void MetadataBatch::SetModelTypeState(const sync_pb::ModelTypeState& state) { | |
| 28 state_ = state; | |
| 29 } | |
| 30 | |
| 31 } // namespace syncer | |
| OLD | NEW |