alanlxl | 30f15bd | 2020-08-11 21:26:12 +1000 | [diff] [blame] | 1 | // Copyright 2020 The Chromium OS 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 | #ifndef FEDERATED_STORAGE_MANAGER_IMPL_H_ |
| 6 | #define FEDERATED_STORAGE_MANAGER_IMPL_H_ |
| 7 | |
| 8 | #include "federated/storage_manager.h" |
| 9 | |
| 10 | #include <string> |
| 11 | #include <base/sequence_checker.h> |
| 12 | |
| 13 | namespace federated { |
| 14 | |
| 15 | class StorageManagerImpl : public StorageManager { |
| 16 | public: |
| 17 | StorageManagerImpl() = default; |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame^] | 18 | StorageManagerImpl(const StorageManagerImpl&) = delete; |
| 19 | StorageManagerImpl& operator=(const StorageManagerImpl&) = delete; |
| 20 | |
alanlxl | 30f15bd | 2020-08-11 21:26:12 +1000 | [diff] [blame] | 21 | ~StorageManagerImpl() override = default; |
| 22 | |
| 23 | bool OnExampleReceived(const std::string& client_name, |
| 24 | const std::string& serialized_example) override; |
| 25 | |
| 26 | bool PrepareStreamingForClient(const std::string& client_name) override; |
| 27 | bool GetNextExample(std::string* example) override; |
| 28 | bool CloseStreaming() override; |
| 29 | |
| 30 | private: |
| 31 | SEQUENCE_CHECKER(sequence_checker_); |
alanlxl | 30f15bd | 2020-08-11 21:26:12 +1000 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | } // namespace federated |
| 35 | |
| 36 | #endif // FEDERATED_STORAGE_MANAGER_IMPL_H_ |