ash_paths.h 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // Copyright (c) 2013 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 ASH_CONSTANTS_ASH_PATHS_H_
  5. #define ASH_CONSTANTS_ASH_PATHS_H_
  6. #include "base/component_export.h"
  7. namespace base {
  8. class FilePath;
  9. }
  10. // This file declares path keys for the chromeos module. These can be used with
  11. // the PathService to access various special directories and files.
  12. namespace ash {
  13. enum {
  14. PATH_START = 7000,
  15. FILE_DEFAULT_APP_ORDER, // Full path to the json file that defines the
  16. // default app order.
  17. FILE_MACHINE_INFO, // Full path to machine hardware info file.
  18. FILE_VPD, // Full path to VPD file.
  19. FILE_UPTIME, // Full path to the file via which the kernel
  20. // exposes the current device uptime.
  21. FILE_UPDATE_REBOOT_NEEDED_UPTIME, // Full path to a file in which Chrome can
  22. // store the uptime at which an update
  23. // became necessary. The file should be
  24. // cleared on boot.
  25. FILE_STARTUP_CUSTOMIZATION_MANIFEST, // Path to OEM partner startup
  26. // customization manifest.
  27. DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, // Directory under which a cache of
  28. // force-installed extensions is
  29. // maintained for each device-local
  30. // account.
  31. DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, // Directory where external data
  32. // referenced by policies is cached
  33. // for device-local accounts.
  34. DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, // Directory where policy for
  35. // components is stored for
  36. // device-local accounts.
  37. // Currently this is used for
  38. // policy for extensions.
  39. DIR_DEVICE_DISPLAY_PROFILES, // Destination directory for system display
  40. // profiles downloaded from Quirks Server.
  41. DIR_DEVICE_DISPLAY_PROFILES_VPD, // Destination directory for system display
  42. // profiles imported from the VPD.
  43. DIR_DEVICE_EXTENSION_LOCAL_CACHE, // Directory where extension local cache
  44. // is stored.
  45. DIR_SIGNIN_PROFILE_COMPONENT_POLICY, // Directory where policy for components
  46. // is stored for the signin profile.
  47. // Currently this is used for policy for
  48. // extensions.
  49. DIR_SIGNIN_PROFILE_EXTENSIONS, // Directory under which a cache of
  50. // force-installed extensions is
  51. // maintained for the signin profile.
  52. DIR_PREINSTALLED_COMPONENTS, // Directory that contains pre-installed
  53. // components.
  54. DIR_DEVICE_POLICY_EXTERNAL_DATA, // Directory where device policy external
  55. // data resources are cached.
  56. PATH_END
  57. };
  58. // Call once to register the provider for the path keys defined above.
  59. COMPONENT_EXPORT(ASH_CONSTANTS) void RegisterPathProvider();
  60. // Overrides some of the paths listed above so that those files can be used
  61. // when not running on ChromeOS. The stubs files will be relative to
  62. // |stubs_dir|. It is not valid to call this when running on ChromeOS.
  63. COMPONENT_EXPORT(ASH_CONSTANTS)
  64. void RegisterStubPathOverrides(const base::FilePath& stubs_dir);
  65. } // namespace ash
  66. // TODO(https://crbug.com/1164001): remove when the migration is finished.
  67. namespace chromeos {
  68. using ::ash::DIR_DEVICE_DISPLAY_PROFILES;
  69. using ::ash::DIR_SIGNIN_PROFILE_EXTENSIONS;
  70. using ::ash::FILE_DEFAULT_APP_ORDER;
  71. using ::ash::FILE_MACHINE_INFO;
  72. using ::ash::FILE_VPD;
  73. } // namespace chromeos
  74. #endif // ASH_CONSTANTS_ASH_PATHS_H_