chrome_paths.h revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
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
5#ifndef CHROME_COMMON_CHROME_PATHS_H__
6#define CHROME_COMMON_CHROME_PATHS_H__
7
8#include "build/build_config.h"
9
10// This file declares path keys for the chrome module.  These can be used with
11// the PathService to access various special directories and files.
12
13namespace chrome {
14
15enum {
16  PATH_START = 1000,
17
18  DIR_APP = PATH_START,         // Directory where dlls and data reside.
19  DIR_LOGS,                     // Directory where logs should be written.
20  DIR_USER_DATA,                // Directory where user data can be written.
21  DIR_CRASH_DUMPS,              // Directory where crash dumps are written.
22  DIR_RESOURCES,                // Directory containing separate file resources
23                                // used by Chrome at runtime.
24  DIR_INSPECTOR,                // Directory where web inspector is located.
25  DIR_APP_DICTIONARIES,         // Directory where the global dictionaries are.
26  DIR_USER_DOCUMENTS,           // Directory for a user's "My Documents".
27  DIR_USER_MUSIC,               // Directory for a user's music.
28  DIR_USER_PICTURES,            // Directory for a user's pictures.
29  DIR_USER_VIDEOS,              // Directory for a user's videos.
30  DIR_DEFAULT_DOWNLOADS_SAFE,   // Directory for a user's
31                                // "My Documents/Downloads", (Windows) or
32                                // "Downloads". (Linux)
33  DIR_DEFAULT_DOWNLOADS,        // Directory for a user's downloads.
34  DIR_INTERNAL_PLUGINS,         // Directory where internal plugins reside.
35#if defined(OS_POSIX) && !defined(OS_MACOSX)
36  DIR_POLICY_FILES,             // Directory for system-wide read-only
37                                // policy files that allow sys-admins
38                                // to set policies for chrome. This directory
39                                // contains subdirectories.
40#endif
41#if defined(OS_MACOSX) && !defined(OS_IOS)
42  DIR_MANAGED_PREFS,            // Directory that stores the managed prefs plist
43                                // files for the current user.
44#endif
45#if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS))
46  DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
47                                 // on Chrome Mac.  On Chrome OS, this path is
48                                 // used for OEM customization.
49                                 // Getting this path does not create it.
50#endif
51
52#if defined(OS_LINUX)
53  DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
54                                       // definition manifest files that
55                                       // describe extensions which are to be
56                                       // installed when chrome is run.
57#endif
58  DIR_EXTERNAL_EXTENSIONS,      // Directory where installer places .crx files.
59
60  DIR_DEFAULT_APPS,             // Directory where installer places .crx files
61                                // to be installed when chrome is first run.
62  DIR_PEPPER_FLASH_PLUGIN,      // Directory to the bundled Pepper Flash plugin,
63                                // containing the plugin and the manifest.
64  DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN,  // Base directory of the Pepper
65                                              // Flash plugins downloaded by the
66                                              // component updater.
67  FILE_RESOURCE_MODULE,         // Full path and filename of the module that
68                                // contains embedded resources (version,
69                                // strings, images, etc.).
70  FILE_LOCAL_STATE,             // Path and filename to the file in which
71                                // machine/installation-specific state is saved.
72  FILE_RECORDED_SCRIPT,         // Full path to the script.log file that
73                                // contains recorded browser events for
74                                // playback.
75  FILE_FLASH_PLUGIN,            // Full path to the internal NPAPI Flash plugin
76                                // file. Querying this path will succeed no
77                                // matter the file exists or not.
78  FILE_PEPPER_FLASH_PLUGIN,     // Full path to the bundled Pepper Flash plugin
79                                // file.
80  FILE_PDF_PLUGIN,              // Full path to the internal PDF plugin file.
81
82#if defined(OS_POSIX) && !defined(OS_MACOSX)
83  FILE_NACL_HELPER,             // Full path to Linux nacl_helper executable.
84  FILE_NACL_HELPER_BOOTSTRAP,   // ... and nacl_helper_bootstrap executable.
85#endif
86  FILE_NACL_PLUGIN,             // Full path to the internal NaCl plugin file.
87  DIR_PNACL_BASE,               // Full path to the base dir for PNaCl.
88  DIR_PNACL_COMPONENT,          // Full path to the latest PNaCl version
89                                // (subdir of DIR_PNACL_BASE).
90  FILE_O3D_PLUGIN,              // Full path to the O3D Pepper plugin file.
91  FILE_GTALK_PLUGIN,            // Full path to the GTalk Pepper plugin file.
92  FILE_WIDEVINE_CDM_PLUGIN,     // Full path to the Widevine CDM Pepper plugin
93                                // file.
94  FILE_RESOURCES_PACK,          // Full path to the .pak file containing
95                                // binary data (e.g., html files and images
96                                // used by interal pages).
97  DIR_RESOURCES_EXTENSION,      // Full path to extension resources.
98#if defined(OS_CHROMEOS)
99  DIR_CHROMEOS_WALLPAPERS,      // Directory where downloaded chromeos
100                                // wallpapers reside.
101  DIR_CHROMEOS_WALLPAPER_THUMBNAILS,  // Directory where downloaded chromeos
102                                      // wallpaper thumbnails reside.
103  DIR_CHROMEOS_CUSTOM_WALLPAPERS,     // Directory where custom wallpapers
104                                      // reside.
105  FILE_DEFAULT_APP_ORDER,       // Full path to the json file that defines the
106                                // default app order.
107  DIR_USER_POLICY_KEYS,         // Directory where the session_manager stores
108                                // the user policy keys.
109  FILE_OWNER_KEY,               // Full path to the owner key file.
110  FILE_INSTALL_ATTRIBUTES,      // Full path to the install attributes file.
111  FILE_UPTIME,                  // Full path to the file via which the kernel
112                                // exposes the current device uptime.
113  FILE_UPDATE_REBOOT_NEEDED_UPTIME,  // Full path to a file in which Chrome can
114                                     // store the uptime at which an update
115                                     // became necessary. The file should be
116                                     // cleared on boot.
117#endif
118#if defined(ENABLE_MANAGED_USERS)
119  DIR_MANAGED_USERS_DEFAULT_APPS,  // Directory where installer places .crx
120                                   // files to be installed when managed user
121                                   // session starts.
122#endif
123
124  // Valid only in development environment; TODO(darin): move these
125  DIR_GEN_TEST_DATA,            // Directory where generated test data resides.
126  DIR_TEST_DATA,                // Directory where unit test data resides.
127  DIR_TEST_TOOLS,               // Directory where unit test tools reside.
128
129  PATH_END
130};
131
132// Call once to register the provider for the path keys defined above.
133void RegisterPathProvider();
134
135}  // namespace chrome
136
137#endif  // CHROME_COMMON_CHROME_PATHS_H__
138