blob: 748fb9878e982aaddcb8109ed847eb49f5a8b8e6 [file] [log] [blame]
alanlxl30f15bd2020-08-11 21:26:12 +10001// 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
13namespace federated {
14
15class StorageManagerImpl : public StorageManager {
16 public:
17 StorageManagerImpl() = default;
18 ~StorageManagerImpl() override = default;
19
20 bool OnExampleReceived(const std::string& client_name,
21 const std::string& serialized_example) override;
22
23 bool PrepareStreamingForClient(const std::string& client_name) override;
24 bool GetNextExample(std::string* example) override;
25 bool CloseStreaming() override;
26
27 private:
28 SEQUENCE_CHECKER(sequence_checker_);
29 DISALLOW_COPY_AND_ASSIGN(StorageManagerImpl);
30};
31
32} // namespace federated
33
34#endif // FEDERATED_STORAGE_MANAGER_IMPL_H_