chrome_paths.h revision 68043e1e95eeb07d5cae7aca370b26518b0867d6
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. 21eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch 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) FILE_NACL_PLUGIN, // Full path to the internal NaCl plugin file. 835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_PNACL_BASE, // Full path to the base dir for PNaCl. 845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version 855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // (subdir of DIR_PNACL_BASE). 865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_O3D_PLUGIN, // Full path to the O3D Pepper plugin file. 87c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) FILE_O1D_PLUGIN, // Full path to the O1D Pepper plugin file. 8868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) FILE_EFFECTS_PLUGIN, // Full path to the Effects Pepper plugin file. 895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_GTALK_PLUGIN, // Full path to the GTalk Pepper plugin file. 90c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated 91c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // Widevine CDM files. 92c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. 935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_RESOURCES_PACK, // Full path to the .pak file containing 945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // binary data (e.g., html files and images 95c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // used by internal pages). 965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_RESOURCES_EXTENSION, // Full path to extension resources. 975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_CHROMEOS) 985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_CHROMEOS_WALLPAPERS, // Directory where downloaded chromeos 995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // wallpapers reside. 1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DIR_CHROMEOS_WALLPAPER_THUMBNAILS, // Directory where downloaded chromeos 1012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // wallpaper thumbnails reside. 1022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DIR_CHROMEOS_CUSTOM_WALLPAPERS, // Directory where custom wallpapers 1032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // reside. 1042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif 1052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DIR_MANAGED_USERS_DEFAULT_APPS, // Directory where installer places .crx 1062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // files to be installed when managed user 1072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // session starts. 1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Valid only in development environment; TODO(darin): move these 1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_GEN_TEST_DATA, // Directory where generated test data resides. 1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_TEST_DATA, // Directory where unit test data resides. 1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_TEST_TOOLS, // Directory where unit test tools reside. 1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PATH_END 1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Call once to register the provider for the path keys defined above. 1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void RegisterPathProvider(); 1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace chrome 1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_COMMON_CHROME_PATHS_H__ 123