host_settings_win.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2021 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. #ifndef REMOTING_BASE_HOST_SETTINGS_WIN_H_
  5. #define REMOTING_BASE_HOST_SETTINGS_WIN_H_
  6. #include "base/win/registry.h"
  7. #include "base/win/windows_types.h"
  8. #include "remoting/base/host_settings.h"
  9. namespace remoting {
  10. // HostSettings implementation for Windows that stores settings in the HKLM hive
  11. // in the registry.
  12. class HostSettingsWin final : public HostSettings {
  13. public:
  14. HostSettingsWin();
  15. HostSettingsWin(const HostSettingsWin&) = delete;
  16. HostSettingsWin& operator=(const HostSettingsWin&) = delete;
  17. ~HostSettingsWin() override;
  18. // HostSettings implementation.
  19. void InitializeInstance() override;
  20. std::string GetString(const HostSettingKey key,
  21. const std::string& default_value) const override;
  22. void SetString(const HostSettingKey key, const std::string& value) override;
  23. private:
  24. base::win::RegKey settings_root_key_;
  25. };
  26. } // namespace remoting
  27. #endif // REMOTING_BASE_HOST_SETTINGS_WIN_H_