electron_paths.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2015 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 ELECTRON_SHELL_COMMON_ELECTRON_PATHS_H_
  5. #define ELECTRON_SHELL_COMMON_ELECTRON_PATHS_H_
  6. #include "base/base_paths.h"
  7. #if BUILDFLAG(IS_WIN)
  8. #include "base/base_paths_win.h"
  9. #elif BUILDFLAG(IS_MAC)
  10. #include "base/base_paths_mac.h"
  11. #endif
  12. #if BUILDFLAG(IS_POSIX)
  13. #include "base/base_paths_posix.h"
  14. #endif
  15. namespace electron {
  16. enum {
  17. PATH_START = 11000,
  18. DIR_USER_CACHE = PATH_START, // Directory where user cache can be written.
  19. DIR_APP_LOGS, // Directory where app logs live
  20. #if BUILDFLAG(IS_WIN)
  21. DIR_RECENT, // Directory where recent files live
  22. #endif
  23. #if BUILDFLAG(IS_LINUX)
  24. DIR_APP_DATA, // Application Data directory under the user profile.
  25. #endif
  26. DIR_CRASH_DUMPS, // c.f. chrome::DIR_CRASH_DUMPS
  27. PATH_END, // End of new paths. Those that follow redirect to base::DIR_*
  28. #if BUILDFLAG(IS_WIN)
  29. DIR_APP_DATA = base::DIR_ROAMING_APP_DATA,
  30. #elif BUILDFLAG(IS_MAC)
  31. DIR_APP_DATA = base::DIR_APP_DATA,
  32. #endif
  33. };
  34. static_assert(PATH_START < PATH_END, "invalid PATH boundaries");
  35. } // namespace electron
  36. #endif // ELECTRON_SHELL_COMMON_ELECTRON_PATHS_H_