electron_paths.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 SHELL_COMMON_ELECTRON_PATHS_H_
  5. #define SHELL_COMMON_ELECTRON_PATHS_H_
  6. #include "base/base_paths.h"
  7. #if defined(OS_WIN)
  8. #include "base/base_paths_win.h"
  9. #elif defined(OS_MACOSX)
  10. #include "base/base_paths_mac.h"
  11. #endif
  12. #if defined(OS_POSIX)
  13. #include "base/base_paths_posix.h"
  14. #endif
  15. namespace electron {
  16. enum {
  17. PATH_START = 11000,
  18. DIR_USER_DATA = PATH_START, // Directory where user data can be written.
  19. DIR_USER_CACHE, // Directory where user cache can be written.
  20. DIR_APP_LOGS, // Directory where app logs live
  21. #if defined(OS_LINUX)
  22. DIR_APP_DATA, // Application Data directory under the user profile.
  23. #endif
  24. DIR_CRASH_DUMPS, // c.f. chrome::DIR_CRASH_DUMPS
  25. PATH_END, // End of new paths. Those that follow redirect to base::DIR_*
  26. #if !defined(OS_LINUX)
  27. DIR_APP_DATA = base::DIR_APP_DATA,
  28. #endif
  29. #if defined(OS_POSIX)
  30. DIR_CACHE = base::DIR_CACHE // Directory where to put cache data.
  31. #else
  32. DIR_CACHE = base::DIR_APP_DATA
  33. #endif
  34. };
  35. static_assert(PATH_START < PATH_END, "invalid PATH boundaries");
  36. } // namespace electron
  37. #endif // SHELL_COMMON_ELECTRON_PATHS_H_