file_path_util_linux.cc 659 B

123456789101112131415161718192021222324
  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. #include "remoting/base/file_path_util_linux.h"
  5. #include "base/base_paths.h"
  6. #include "base/hash/md5.h"
  7. #include "base/path_service.h"
  8. #include "net/base/network_interfaces.h"
  9. namespace remoting {
  10. base::FilePath GetConfigDirectoryPath() {
  11. base::FilePath homedir;
  12. base::PathService::Get(base::DIR_HOME, &homedir);
  13. return homedir.Append(".config/chrome-remote-desktop");
  14. }
  15. std::string GetHostHash() {
  16. return "host#" + base::MD5String(net::GetHostName());
  17. }
  18. } // namespace remoting