OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_CHROME_PATHS_H__ | 5 #ifndef CHROME_COMMON_CHROME_PATHS_H__ |
6 #define CHROME_COMMON_CHROME_PATHS_H__ | 6 #define CHROME_COMMON_CHROME_PATHS_H__ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class FilePath; | 11 class FilePath; |
12 } | 12 } |
13 | 13 |
14 // This file declares path keys for the chrome module. These can be used with | 14 // This file declares path keys for the chrome module. These can be used with |
15 // the PathService to access various special directories and files. | 15 // the PathService to access various special directories and files. |
16 | 16 |
17 namespace chrome { | 17 namespace chrome { |
18 | 18 |
19 enum { | 19 enum { |
20 PATH_START = 1000, | 20 PATH_START = 1000, |
21 | 21 DIR_APP = PATH_START, // Directory where dlls and data reside. |
jam
2014/04/28 17:47:38
nit: Please undo all the spacing changes to this f
luken
2014/04/28 17:57:16
Will do. git cl format did this, I'll clean it up.
| |
22 DIR_APP = PATH_START, // Directory where dlls and data reside. | 22 DIR_LOGS, // Directory where logs should be written. |
23 DIR_LOGS, // Directory where logs should be written. | 23 DIR_USER_DATA, // Directory where user data can be written. |
24 DIR_USER_DATA, // Directory where user data can be written. | 24 DIR_CRASH_DUMPS, // Directory where crash dumps are written. |
25 DIR_CRASH_DUMPS, // Directory where crash dumps are written. | 25 DIR_RESOURCES, // Directory containing separate file resources |
26 DIR_RESOURCES, // Directory containing separate file resources | 26 // used by Chrome at runtime. |
27 // used by Chrome at runtime. | 27 DIR_INSPECTOR, // Directory where web inspector is located. |
28 DIR_INSPECTOR, // Directory where web inspector is located. | 28 DIR_APP_DICTIONARIES, // Directory where the global dictionaries are. |
29 DIR_APP_DICTIONARIES, // Directory where the global dictionaries are. | 29 DIR_USER_DOCUMENTS, // Directory for a user's "My Documents". |
30 DIR_USER_DOCUMENTS, // Directory for a user's "My Documents". | 30 DIR_USER_MUSIC, // Directory for a user's music. |
31 DIR_USER_MUSIC, // Directory for a user's music. | 31 DIR_USER_PICTURES, // Directory for a user's pictures. |
32 DIR_USER_PICTURES, // Directory for a user's pictures. | 32 DIR_USER_VIDEOS, // Directory for a user's videos. |
33 DIR_USER_VIDEOS, // Directory for a user's videos. | 33 DIR_DEFAULT_DOWNLOADS_SAFE, // Directory for a user's |
34 DIR_DEFAULT_DOWNLOADS_SAFE, // Directory for a user's | 34 // "My Documents/Downloads", (Windows) or |
35 // "My Documents/Downloads", (Windows) or | 35 // "Downloads". (Linux) |
36 // "Downloads". (Linux) | 36 DIR_DEFAULT_DOWNLOADS, // Directory for a user's downloads. |
37 DIR_DEFAULT_DOWNLOADS, // Directory for a user's downloads. | 37 DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside. |
38 DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside. | |
39 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 38 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
40 DIR_POLICY_FILES, // Directory for system-wide read-only | 39 DIR_POLICY_FILES, // Directory for system-wide read-only |
41 // policy files that allow sys-admins | 40 // policy files that allow sys-admins |
42 // to set policies for chrome. This directory | 41 // to set policies for chrome. This directory |
43 // contains subdirectories. | 42 // contains subdirectories. |
44 #endif | 43 #endif |
45 #if defined(OS_MACOSX) && !defined(OS_IOS) | 44 #if defined(OS_MACOSX) && !defined(OS_IOS) |
46 DIR_MANAGED_PREFS, // Directory that stores the managed prefs plist | 45 DIR_MANAGED_PREFS, // Directory that stores the managed prefs plist |
47 // files for the current user. | 46 // files for the current user. |
48 DIR_USER_APPLICATIONS, // ~/Applications | 47 DIR_USER_APPLICATIONS, // ~/Applications |
49 DIR_USER_LIBRARY, // ~/Library | 48 DIR_USER_LIBRARY, // ~/Library |
50 #endif | 49 #endif |
51 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 50 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
52 DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions | 51 DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions |
53 // on Chrome Mac. On Chrome OS, this path is | 52 // on Chrome Mac. On Chrome OS, this path is |
54 // used for OEM customization. | 53 // used for OEM customization. |
55 // Getting this path does not create it. | 54 // Getting this path does not create it. |
56 #endif | 55 #endif |
57 | 56 |
58 #if defined(OS_LINUX) | 57 #if defined(OS_LINUX) |
59 DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' | 58 DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' |
60 // definition manifest files that | 59 // definition manifest files that |
61 // describe extensions which are to be | 60 // describe extensions which are to be |
62 // installed when chrome is run. | 61 // installed when chrome is run. |
63 #endif | 62 #endif |
64 DIR_EXTERNAL_EXTENSIONS, // Directory where installer places .crx files. | 63 DIR_EXTERNAL_EXTENSIONS, // Directory where installer places .crx files. |
65 | 64 DIR_DEFAULT_APPS, // Directory where installer places .crx files |
66 DIR_DEFAULT_APPS, // Directory where installer places .crx files | 65 // to be installed when chrome is first run. |
67 // to be installed when chrome is first run. | 66 DIR_PEPPER_FLASH_PLUGIN, // Directory to the bundled Pepper Flash plugin, |
68 DIR_PEPPER_FLASH_PLUGIN, // Directory to the bundled Pepper Flash plugin, | 67 // containing the plugin and the manifest. |
69 // containing the plugin and the manifest. | |
70 DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, // Base directory of the Pepper | 68 DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, // Base directory of the Pepper |
71 // Flash plugins downloaded by the | 69 // Flash plugins downloaded by the |
72 // component updater. | 70 // component updater. |
73 FILE_RESOURCE_MODULE, // Full path and filename of the module that | 71 DIR_PEPPER_FLASH_DEBUGGER_PLUGIN, // Base directory of the debugging version |
74 // contains embedded resources (version, | 72 // of the Pepper Flash plugin. |
75 // strings, images, etc.). | 73 FILE_RESOURCE_MODULE, // Full path and filename of the module that |
76 FILE_LOCAL_STATE, // Path and filename to the file in which | 74 // contains embedded resources (version, |
77 // machine/installation-specific state is saved. | 75 // strings, images, etc.). |
78 FILE_RECORDED_SCRIPT, // Full path to the script.log file that | 76 FILE_LOCAL_STATE, // Path and filename to the file in which |
79 // contains recorded browser events for | 77 // machine/installation-specific state is saved. |
80 // playback. | 78 FILE_RECORDED_SCRIPT, // Full path to the script.log file that |
81 FILE_FLASH_PLUGIN, // Full path to the internal NPAPI Flash plugin | 79 // contains recorded browser events for |
82 // file. Querying this path will succeed no | 80 // playback. |
83 // matter the file exists or not. | 81 FILE_FLASH_PLUGIN, // Full path to the internal NPAPI Flash plugin |
84 FILE_PEPPER_FLASH_PLUGIN, // Full path to the bundled Pepper Flash plugin | 82 // file. Querying this path will succeed no |
85 // file. | 83 // matter the file exists or not. |
86 FILE_PDF_PLUGIN, // Full path to the internal PDF plugin file. | 84 FILE_PEPPER_FLASH_PLUGIN, // Full path to the bundled Pepper Flash plugin |
87 | 85 // file. |
88 FILE_NACL_PLUGIN, // Full path to the internal NaCl plugin file. | 86 FILE_PDF_PLUGIN, // Full path to the internal PDF plugin file. |
89 DIR_PNACL_BASE, // Full path to the base dir for PNaCl. | 87 FILE_NACL_PLUGIN, // Full path to the internal NaCl plugin file. |
90 DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version | 88 DIR_PNACL_BASE, // Full path to the base dir for PNaCl. |
91 // (subdir of DIR_PNACL_BASE). | 89 DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version |
92 FILE_O1D_PLUGIN, // Full path to the O1D Pepper plugin file. | 90 // (subdir of DIR_PNACL_BASE). |
93 FILE_EFFECTS_PLUGIN, // Full path to the Effects Pepper plugin file. | 91 FILE_O1D_PLUGIN, // Full path to the O1D Pepper plugin file. |
94 FILE_GTALK_PLUGIN, // Full path to the GTalk Pepper plugin file. | 92 FILE_EFFECTS_PLUGIN, // Full path to the Effects Pepper plugin file. |
95 DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated | 93 FILE_GTALK_PLUGIN, // Full path to the GTalk Pepper plugin file. |
96 // Widevine CDM files. | 94 DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated |
97 FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. | 95 // Widevine CDM files. |
98 FILE_RESOURCES_PACK, // Full path to the .pak file containing | 96 FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. |
99 // binary data (e.g., html files and images | 97 FILE_RESOURCES_PACK, // Full path to the .pak file containing |
100 // used by internal pages). | 98 // binary data (e.g., html files and images |
101 DIR_RESOURCES_EXTENSION, // Full path to extension resources. | 99 // used by internal pages). |
100 DIR_RESOURCES_EXTENSION, // Full path to extension resources. | |
102 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
103 DIR_CHROMEOS_WALLPAPERS, // Directory where downloaded chromeos | 102 DIR_CHROMEOS_WALLPAPERS, // Directory where downloaded chromeos |
104 // wallpapers reside. | 103 // wallpapers reside. |
105 DIR_CHROMEOS_WALLPAPER_THUMBNAILS, // Directory where downloaded chromeos | 104 DIR_CHROMEOS_WALLPAPER_THUMBNAILS, // Directory where downloaded chromeos |
106 // wallpaper thumbnails reside. | 105 // wallpaper thumbnails reside. |
107 DIR_CHROMEOS_CUSTOM_WALLPAPERS, // Directory where custom wallpapers | 106 DIR_CHROMEOS_CUSTOM_WALLPAPERS, // Directory where custom wallpapers |
108 // reside. | 107 // reside. |
109 #endif | 108 #endif |
110 DIR_MANAGED_USERS_DEFAULT_APPS, // Directory where installer places .crx | 109 DIR_MANAGED_USERS_DEFAULT_APPS, // Directory where installer places .crx |
111 // files to be installed when managed user | 110 // files to be installed when managed user |
112 // session starts. | 111 // session starts. |
113 | 112 |
114 #if defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 113 #if defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
115 DIR_NATIVE_MESSAGING, // System directory where native messaging host | 114 DIR_NATIVE_MESSAGING, // System directory where native messaging host |
116 // manifest files are stored. | 115 // manifest files are stored. |
117 DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts | 116 DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts |
118 // installed per-user. | 117 // installed per-user. |
119 #endif | 118 #endif |
120 | 119 |
121 // Valid only in development environment; TODO(darin): move these | 120 // Valid only in development environment; TODO(darin): move these |
122 DIR_GEN_TEST_DATA, // Directory where generated test data resides. | 121 DIR_GEN_TEST_DATA, // Directory where generated test data resides. |
123 DIR_TEST_DATA, // Directory where unit test data resides. | 122 DIR_TEST_DATA, // Directory where unit test data resides. |
124 DIR_TEST_TOOLS, // Directory where unit test tools reside. | 123 DIR_TEST_TOOLS, // Directory where unit test tools reside. |
125 | |
126 PATH_END | 124 PATH_END |
127 }; | 125 }; |
128 | 126 |
129 // Call once to register the provider for the path keys defined above. | 127 // Call once to register the provider for the path keys defined above. |
130 void RegisterPathProvider(); | 128 void RegisterPathProvider(); |
131 | 129 |
132 // Get or set the invalid user data dir that was originally specified. | 130 // Get or set the invalid user data dir that was originally specified. |
133 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir); | 131 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir); |
134 const base::FilePath& GetInvalidSpecifiedUserDataDir(); | 132 const base::FilePath& GetInvalidSpecifiedUserDataDir(); |
135 | 133 |
136 } // namespace chrome | 134 } // namespace chrome |
137 | 135 |
138 #endif // CHROME_COMMON_CHROME_PATHS_H__ | 136 #endif // CHROME_COMMON_CHROME_PATHS_H__ |
OLD | NEW |