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