chrome_paths.h revision 5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1
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) 10a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)namespace base { 11a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)class FilePath; 12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This file declares path keys for the chrome module. These can be used with 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the PathService to access various special directories and files. 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace chrome { 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)enum { 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PATH_START = 1000, 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_APP = PATH_START, // Directory where dlls and data reside. 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_LOGS, // Directory where logs should be written. 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_USER_DATA, // Directory where user data can be written. 25eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch DIR_CRASH_DUMPS, // Directory where crash dumps are written. 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_RESOURCES, // Directory containing separate file resources 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // used by Chrome at runtime. 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_INSPECTOR, // Directory where web inspector is located. 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_APP_DICTIONARIES, // Directory where the global dictionaries are. 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_USER_DOCUMENTS, // Directory for a user's "My Documents". 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_USER_MUSIC, // Directory for a user's music. 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_USER_PICTURES, // Directory for a user's pictures. 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_USER_VIDEOS, // Directory for a user's videos. 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_DEFAULT_DOWNLOADS_SAFE, // Directory for a user's 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // "My Documents/Downloads", (Windows) or 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // "Downloads". (Linux) 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_DEFAULT_DOWNLOADS, // Directory for a user's downloads. 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside. 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_POSIX) && !defined(OS_MACOSX) 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_POLICY_FILES, // Directory for system-wide read-only 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // policy files that allow sys-admins 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // to set policies for chrome. This directory 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // contains subdirectories. 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(OS_MACOSX) && !defined(OS_IOS) 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_MANAGED_PREFS, // Directory that stores the managed prefs plist 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // files for the current user. 48a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) DIR_USER_APPLICATIONS, // ~/Applications 49a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) DIR_USER_LIBRARY, // ~/Library 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS)) 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // on Chrome Mac. On Chrome OS, this path is 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // used for OEM customization. 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Getting this path does not create it. 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_LINUX) 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // definition manifest files that 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // describe extensions which are to be 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // installed when chrome is run. 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_EXTERNAL_EXTENSIONS, // Directory where installer places .crx files. 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_DEFAULT_APPS, // Directory where installer places .crx files 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // to be installed when chrome is first run. 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_PEPPER_FLASH_PLUGIN, // Directory to the bundled Pepper Flash plugin, 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // containing the plugin and the manifest. 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, // Base directory of the Pepper 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Flash plugins downloaded by the 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // component updater. 735c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu DIR_PEPPER_FLASH_DEBUGGER_PLUGIN, // Base directory of the debugging version 745c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // of the Pepper Flash plugin. 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_RESOURCE_MODULE, // Full path and filename of the module that 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // contains embedded resources (version, 775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // strings, images, etc.). 785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_LOCAL_STATE, // Path and filename to the file in which 795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // machine/installation-specific state is saved. 805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_RECORDED_SCRIPT, // Full path to the script.log file that 815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // contains recorded browser events for 825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // playback. 832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) FILE_FLASH_PLUGIN, // Full path to the internal NPAPI Flash plugin 842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // file. Querying this path will succeed no 852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // matter the file exists or not. 865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_PEPPER_FLASH_PLUGIN, // Full path to the bundled Pepper Flash plugin 875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // file. 885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_PDF_PLUGIN, // Full path to the internal PDF plugin file. 895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_NACL_PLUGIN, // Full path to the internal NaCl plugin file. 915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_PNACL_BASE, // Full path to the base dir for PNaCl. 925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version 935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // (subdir of DIR_PNACL_BASE). 94c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) FILE_O1D_PLUGIN, // Full path to the O1D Pepper plugin file. 9568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) FILE_EFFECTS_PLUGIN, // Full path to the Effects Pepper plugin file. 965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_GTALK_PLUGIN, // Full path to the GTalk Pepper plugin file. 975c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu DIR_COMPONENT_CLD2, // Directory that contains component-updated 985c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu // Compact Language Detector files 99c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated 100c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // Widevine CDM files. 101c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. 1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) FILE_RESOURCES_PACK, // Full path to the .pak file containing 1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // binary data (e.g., html files and images 104c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // used by internal pages). 1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_RESOURCES_EXTENSION, // Full path to extension resources. 1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_CHROMEOS) 1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_CHROMEOS_WALLPAPERS, // Directory where downloaded chromeos 1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // wallpapers reside. 1092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DIR_CHROMEOS_WALLPAPER_THUMBNAILS, // Directory where downloaded chromeos 1102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // wallpaper thumbnails reside. 1112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DIR_CHROMEOS_CUSTOM_WALLPAPERS, // Directory where custom wallpapers 1122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // reside. 1132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif 1142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DIR_MANAGED_USERS_DEFAULT_APPS, // Directory where installer places .crx 1152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // files to be installed when managed user 1162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // session starts. 1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) 1195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DIR_NATIVE_MESSAGING, // System directory where native messaging host 1205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // manifest files are stored. 1215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts 1225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // installed per-user. 1235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif 1245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Valid only in development environment; TODO(darin): move these 1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_GEN_TEST_DATA, // Directory where generated test data resides. 1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_TEST_DATA, // Directory where unit test data resides. 1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DIR_TEST_TOOLS, // Directory where unit test tools reside. 1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PATH_END 1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Call once to register the provider for the path keys defined above. 1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void RegisterPathProvider(); 1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 136a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Get or set the invalid user data dir that was originally specified. 137a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir); 138a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const base::FilePath& GetInvalidSpecifiedUserDataDir(); 139a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace chrome 1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_COMMON_CHROME_PATHS_H__ 143