chrome_paths.h revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_COMMON_CHROME_PATHS_H__
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_COMMON_CHROME_PATHS_H__
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "build/build_config.h"
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This file declares path keys for the chrome module.  These can be used with
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the PathService to access various special directories and files.
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace chrome {
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)enum {
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PATH_START = 1000,
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_APP = PATH_START,         // Directory where dlls and data reside.
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_LOGS,                     // Directory where logs should be written.
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_USER_DATA,                // Directory where user data can be written.
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_CRASH_DUMPS,              // Directory where crash dumps are written.
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_RESOURCES,                // Directory containing separate file resources
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // used by Chrome at runtime.
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_INSPECTOR,                // Directory where web inspector is located.
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_APP_DICTIONARIES,         // Directory where the global dictionaries are.
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_USER_DOCUMENTS,           // Directory for a user's "My Documents".
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_USER_MUSIC,               // Directory for a user's music.
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_USER_PICTURES,            // Directory for a user's pictures.
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_USER_VIDEOS,              // Directory for a user's videos.
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_DEFAULT_DOWNLOADS_SAFE,   // Directory for a user's
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // "My Documents/Downloads", (Windows) or
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // "Downloads". (Linux)
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_DEFAULT_DOWNLOADS,        // Directory for a user's downloads.
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_INTERNAL_PLUGINS,         // Directory where internal plugins reside.
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_POSIX) && !defined(OS_MACOSX)
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_POLICY_FILES,             // Directory for system-wide read-only
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // policy files that allow sys-admins
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // to set policies for chrome. This directory
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // contains subdirectories.
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(OS_MACOSX) && !defined(OS_IOS)
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_MANAGED_PREFS,            // Directory that stores the managed prefs plist
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // files for the current user.
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS))
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                 // on Chrome Mac.  On Chrome OS, this path is
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                 // used for OEM customization.
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                 // Getting this path does not create it.
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_LINUX)
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                       // definition manifest files that
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                       // describe extensions which are to be
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                       // installed when chrome is run.
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_EXTERNAL_EXTENSIONS,      // Directory where installer places .crx files.
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_DEFAULT_APPS,             // Directory where installer places .crx files
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // to be installed when chrome is first run.
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_PEPPER_FLASH_PLUGIN,      // Directory to the bundled Pepper Flash plugin,
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // containing the plugin and the manifest.
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN,  // Base directory of the Pepper
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                              // Flash plugins downloaded by the
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                              // component updater.
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_RESOURCE_MODULE,         // Full path and filename of the module that
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // contains embedded resources (version,
695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // strings, images, etc.).
705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_LOCAL_STATE,             // Path and filename to the file in which
715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // machine/installation-specific state is saved.
725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_RECORDED_SCRIPT,         // Full path to the script.log file that
735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // contains recorded browser events for
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // playback.
752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  FILE_FLASH_PLUGIN,            // Full path to the internal NPAPI Flash plugin
762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                // file. Querying this path will succeed no
772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                // matter the file exists or not.
785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_PEPPER_FLASH_PLUGIN,     // Full path to the bundled Pepper Flash plugin
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // file.
805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_PDF_PLUGIN,              // Full path to the internal PDF plugin file.
815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_POSIX) && !defined(OS_MACOSX)
835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_NACL_HELPER,             // Full path to Linux nacl_helper executable.
845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_NACL_HELPER_BOOTSTRAP,   // ... and nacl_helper_bootstrap executable.
855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_NACL_PLUGIN,             // Full path to the internal NaCl plugin file.
875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_PNACL_BASE,               // Full path to the base dir for PNaCl.
885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_PNACL_COMPONENT,          // Full path to the latest PNaCl version
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // (subdir of DIR_PNACL_BASE).
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_O3D_PLUGIN,              // Full path to the O3D Pepper plugin file.
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_GTALK_PLUGIN,            // Full path to the GTalk Pepper plugin file.
925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_WIDEVINE_CDM_PLUGIN,     // Full path to the Widevine CDM Pepper plugin
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // file.
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_RESOURCES_PACK,          // Full path to the .pak file containing
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // binary data (e.g., html files and images
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // used by interal pages).
975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_RESOURCES_EXTENSION,      // Full path to extension resources.
985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_CHROMEOS)
995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_CHROMEOS_WALLPAPERS,      // Directory where downloaded chromeos
1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // wallpapers reside.
1012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DIR_CHROMEOS_WALLPAPER_THUMBNAILS,  // Directory where downloaded chromeos
1022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                      // wallpaper thumbnails reside.
1032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DIR_CHROMEOS_CUSTOM_WALLPAPERS,     // Directory where custom wallpapers
1042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                      // reside.
1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  FILE_DEFAULT_APP_ORDER,       // Full path to the json file that defines the
1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                // default app order.
1072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DIR_USER_POLICY_KEYS,         // Directory where the session_manager stores
1082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                // the user policy keys.
1092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  FILE_OWNER_KEY,               // Full path to the owner key file.
1102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  FILE_INSTALL_ATTRIBUTES,      // Full path to the install attributes file.
1112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  FILE_UPTIME,                  // Full path to the file via which the kernel
1122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                // exposes the current device uptime.
1132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  FILE_UPDATE_REBOOT_NEEDED_UPTIME,  // Full path to a file in which Chrome can
1142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                     // store the uptime at which an update
1152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                     // became necessary. The file should be
1162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                     // cleared on boot.
1172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif
1182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(ENABLE_MANAGED_USERS)
1192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DIR_MANAGED_USERS_DEFAULT_APPS,  // Directory where installer places .crx
1202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                   // files to be installed when managed user
1212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                   // session starts.
1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
1235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Valid only in development environment; TODO(darin): move these
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_GEN_TEST_DATA,            // Directory where generated test data resides.
1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_TEST_DATA,                // Directory where unit test data resides.
1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  DIR_TEST_TOOLS,               // Directory where unit test tools reside.
1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PATH_END
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Call once to register the provider for the path keys defined above.
1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void RegisterPathProvider();
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace chrome
1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif  // CHROME_COMMON_CHROME_PATHS_H__
138