Upload upstream chromium 108.0.5359.1
[platform/framework/web/chromium-efl.git] / services / device / serial / fake_serial_device_enumerator.h
1 // Copyright 2018 The Chromium Authors
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 SERVICES_DEVICE_SERIAL_FAKE_SERIAL_DEVICE_ENUMERATOR_H_
6 #define SERVICES_DEVICE_SERIAL_FAKE_SERIAL_DEVICE_ENUMERATOR_H_
7
8 #include <map>
9
10 #include "base/files/file_path.h"
11 #include "services/device/serial/serial_device_enumerator.h"
12
13 namespace device {
14
15 class FakeSerialEnumerator : public SerialDeviceEnumerator {
16  public:
17   FakeSerialEnumerator();
18
19   FakeSerialEnumerator(const FakeSerialEnumerator&) = delete;
20   FakeSerialEnumerator& operator=(const FakeSerialEnumerator&) = delete;
21
22   ~FakeSerialEnumerator() override;
23
24   void AddDevicePath(const base::FilePath& path);
25   void RemoveDevicePath(const base::FilePath& path);
26
27  private:
28   std::map<base::FilePath, base::UnguessableToken> paths_;
29 };
30
31 }  // namespace device
32
33 #endif  // SERVICES_DEVICE_SERIAL_FAKE_SERIAL_DEVICE_ENUMERATOR_H_