base_paths.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright (c) 2012 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 BASE_BASE_PATHS_H_
  5. #define BASE_BASE_PATHS_H_
  6. // This file declares path keys for the base module. These can be used with
  7. // the PathService to access various special directories and files.
  8. #include "build/build_config.h"
  9. #if defined(OS_WIN)
  10. #include "base/base_paths_win.h"
  11. #elif defined(OS_APPLE)
  12. #include "base/base_paths_mac.h"
  13. #elif defined(OS_ANDROID)
  14. #include "base/base_paths_android.h"
  15. #endif
  16. #if defined(OS_POSIX) || defined(OS_FUCHSIA)
  17. #include "base/base_paths_posix.h"
  18. #endif
  19. namespace base {
  20. enum BasePathKey {
  21. PATH_START = 0,
  22. DIR_CURRENT, // Current directory.
  23. DIR_EXE, // Directory containing FILE_EXE.
  24. DIR_MODULE, // Directory containing FILE_MODULE.
  25. DIR_ASSETS, // Directory that contains application assets.
  26. DIR_TEMP, // Temporary directory.
  27. DIR_HOME, // User's root home directory. On Windows this will look
  28. // like "C:\Users\<user>" which isn't necessarily a great
  29. // place to put files.
  30. FILE_EXE, // Path and filename of the current executable.
  31. FILE_MODULE, // Path and filename of the module containing the code for
  32. // the PathService (which could differ from FILE_EXE if the
  33. // PathService were compiled into a shared object, for
  34. // example).
  35. DIR_SOURCE_ROOT, // Returns the root of the source tree. This key is useful
  36. // for tests that need to locate various resources. It
  37. // should not be used outside of test code.
  38. DIR_USER_DESKTOP, // The current user's Desktop.
  39. DIR_TEST_DATA, // Used only for testing.
  40. PATH_END
  41. };
  42. } // namespace base
  43. #endif // BASE_BASE_PATHS_H_