Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: chrome/common/extensions/docs/static/external_extensions.html

Issue 9963120: Introduces an additional extension loader that load extra extensions based on per-extension json fi… (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <div id="pageData-name" class="pageData">Other Deployment Options</div> 1 <div id="pageData-name" class="pageData">Other Deployment Options</div>
2 <div id="pageData-showTOC" class="pageData">true</div> 2 <div id="pageData-showTOC" class="pageData">true</div>
3 3
4 <p> 4 <p>
5 Usually, users install their own extensions. 5 Usually, users install their own extensions.
6 But sometimes you might want an extension 6 But sometimes you might want an extension
7 to be installed automatically. 7 to be installed automatically.
8 Here are two typical cases: 8 Here are two typical cases:
9 </p> 9 </p>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 and the ID is <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>. 75 and the ID is <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>.
76 </p> 76 </p>
77 77
78 <h2 id="preferences">Using a preferences file</h2> 78 <h2 id="preferences">Using a preferences file</h2>
79 79
80 <p class="note"> 80 <p class="note">
81 <b>Windows note:</b> 81 <b>Windows note:</b>
82 Until <a href="http://crbug.com/41902">bug 41902</a> is fixed, 82 Until <a href="http://crbug.com/41902">bug 41902</a> is fixed,
83 you might want to use the <a href="#registry">Windows registry</a> 83 you might want to use the <a href="#registry">Windows registry</a>
84 instead of the preferences file. 84 instead of the preferences file.
85 </p>
85 86
87 <p class="note">
88 <b>Note:</b>
89 The <code>external_extensions.json</code> files are deprecated although they are
90 still supported for now.
Finnur 2012/04/27 14:29:43 Suggest: Previous versions of Google Chrome used a
Alexandre Abreu 2012/04/27 14:46:52 Done.
86 </p> 91 </p>
87 92
88 <ol> 93 <ol>
89 <li>If you are installing from a file, make the <code>.crx</code> extension 94 <li>If you are installing from a file, make the <code>.crx</code> extension
90 file available to the machine you want to install the extension on. 95 file available to the machine you want to install the extension on.
91 (Copy it to a local directory or to a network share for example, 96 (Copy it to a local directory or to a network share for example,
92 <code>\\server\share\extension.crx</code> 97 <code>\\server\share\extension.crx</code>
93 or <code>/home/share/extension.crx</code>.) 98 or <code>/home/share/extension.crx</code>.)
94 </li> 99 </li>
95 <li>Locate the <code>external_extensions.json</code> file. 100
96 If the file doesn't exist, create it. 101 <li>Create a file with the following name in one of the folders listed below:
102 <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> where the file name (without the extension)
103 corresponds to your extension's ID.
97 The location depends on the operating system. 104 The location depends on the operating system.
98 <dl> 105 <dl>
99 <dt> Windows: </dt> 106 <dt> Windows: </dt>
100 <dd> <code><em>chrome_root</em>\Application\<em>chrome_version</em>\Extensio ns\</code> 107 <dd> <code><em>chrome_root</em>\Application\<em>chrome_version</em>\Extensio ns\</code>
101 <br /> 108 <br />
102 Example: <code>c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0 \Extensions\</code> 109 Example: <code>c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0 \Extensions\</code>
103 </dd> 110 </dd>
104 <dt> Mac OS X:</dt> 111 <dt> Mac OS X:</dt>
105 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br> 112 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br>
106 For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code> 113 For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code>
107 <p>The external extensions file for all users is read only if every director y in the path is owned by the user <code>root</code>, has the group <code>admin< /code> or <code>wheel</code>, and is not world writable. The path must also be free of symbolic links. These restrictions prevent an unprivileged user from ca using extensions to be installed for all users. See <a href="#troubleshooting"> troubleshooting</a> for details.</p> 114 <p>The external extension file for all users is read only if every directory in the path is owned by the user <code>root</code>, has the group <code>admin</ code> or <code>wheel</code>, and is not world writable. The path must also be f ree of symbolic links. These restrictions prevent an unprivileged user from cau sing extensions to be installed for all users. See <a href="#troubleshooting">t roubleshooting</a> for details.</p>
108 <p class="note"> 115 <p class="note">
109 <b>Note:</b> The above path for all users was added in Chrome 16. Prior ver sions used a different path:<br/> 116 <b>Note:</b> The above path for all users was added in Chrome 16. Prior ver sions used a different path:<br/>
110 <code>/Applications/Google Chrome.app/Contents/Extensions/</code> 117 <code>/Applications/Google Chrome.app/Contents/Extensions/</code>
111 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p> 118 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p>
112 </dd> 119 </dd>
113 120
114 <dt> Linux: </dt> 121 <dt> Linux: </dt>
115 <dd> <code>/opt/google/chrome/extensions/</code> <br> 122 <dd> <code>/opt/google/chrome/extensions/</code> <br>
123 </dd>
124 <dd> <code>/usr/share/google-chrome/extensions/</code> <br>
116 <b>Note:</b> Use <code>chmod</code> if necessary 125 <b>Note:</b> Use <code>chmod</code> if necessary
117 to make sure that <code>extensions/external_extensions.json</code> 126 to make sure that the <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> files
118 is world-readable. 127 are world-readable.
119 </dd> 128 </dd>
120 </dl> 129 </dl>
121 </li> 130 </li>
122 <li> Add an entry to <code>external_extensions.json</code>
123 for your extension's ID. If you are installing from a file, specify the
124 extension's location and version with fields named "external_crx" and
125 "external_version".
126 131
132 <li>If you are installing from a file, specify the extension's location and vers ion with fields
133 named "external_crx" and "external_version" in the file created above.
134 <p>
127 Example: 135 Example:
128 <pre>{ 136 <pre>
129 "aaaaaaaaaabbbbbbbbbbcccccccccc": { 137 {
130 "external_crx": "/home/share/extension.crx", 138 "external_crx": "/home/share/extension.crx",
131 "external_version": "1.0" 139 "external_version": "1.0"
132 } 140 }
133 }</pre> 141 </pre>
134 142 </p>
135 <p class="note"> 143 <p class="note">
136 <b>Note:</b> 144 <b>Note:</b>
137 You need to escape 145 You need to escape
138 each <code>\</code> character in the location. 146 each <code>\</code> character in the location.
139 For example, 147 For example,
140 <code>\\server\share\extension.crx</code> would be 148 <code>\\server\share\extension.crx</code> would be
141 <code>"\\\\server\\share\\extension.crx"</code>. 149 <code>"\\\\server\\share\\extension.crx"</code>.
142 </p> 150 </p>
143 <p> 151 <p>
152 <p>
144 If you are installing from an update URL, specify the extension's update URL 153 If you are installing from an update URL, specify the extension's update URL
145 with field name "external_update_url". 154 with field name "external_update_url".
146 </p> 155 </p>
147 Example: 156 Example:
148 <pre>{ 157 <pre>{
149 "aaaaaaaaaabbbbbbbbbbcccccccccc": { 158 "external_update_url": "http://myhost.com/mytestextension/updates.xml"
150 "external_update_url": "http://myhost.com/mytestextension/updates.xml"
151 }
152 }</pre> 159 }</pre>
153 <p> 160 <p>
154 If you would like to install extension only for some browser locales, 161 If you would like to install extension only for some browser locales,
155 you can list supported locales in field name "supported_locale". Locale may 162 you can list supported locales in field name "supported_locale". Locale may
156 specify parent locale like "en", in this case the extension will be 163 specify parent locale like "en", in this case the extension will be
157 installed for all English locales like "en-US", "en-GB", etc. 164 installed for all English locales like "en-US", "en-GB", etc.
158 If another browser locale is selected that is not supported by the extension, 165 If another browser locale is selected that is not supported by the extension,
159 the external extensions will be uninstalled. If "supported_locales" list 166 the external extensions will be uninstalled. If "supported_locales" list
160 is missing, the extension will be installed for any locale. 167 is missing, the extension will be installed for any locale.
161 </p> 168 </p>
162 Example: 169 Example:
163 <pre>{ 170 <pre>{
164 "aaaaaaaaaabbbbbbbbbbcccccccccc": { 171 "external_update_url": "http://myhost.com/mytestextension/updates.xml",
165 "external_update_url": "http://myhost.com/mytestextension/updates.xml", 172 "supported_locales": [ "en", "fr", "de" ]
166 "supported_locales": [ "en", "fr", "de" ]
167 }
168 }</pre> 173 }</pre>
169 </li> 174 </li>
170
171 <li>Save the JSON file. </li> 175 <li>Save the JSON file. </li>
172 <li>Launch Google Chrome and go to <b>chrome://extensions</b>; 176 <li>Launch Google Chrome and go to <b>chrome://extensions</b>;
173 you should see the extension listed. </li> 177 you should see the extension listed. </li>
174 </ol> 178 </ol>
175 179
176 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3> 180 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3>
177 181
178 <p>On Mac OS, the external extensions file for all users is only read if file sy stem permissions prevent unprivelaged users from changing it. If you do not see external extensions installed when Chrome is launched, there may be a permissio ns problem with the external extensions preferences file. To see if this is the problem, follow these steps:</p> 182 <p>On Mac OS, the external extensions files for all users is only read if file s ystem permissions prevent unprivelaged users from changing it. If you do not se e external extensions installed when Chrome is launched, there may be a permissi ons problem with the external extensions preferences files. To see if this is t he problem, follow these steps:</p>
Finnur 2012/04/27 14:29:43 s/is/are s/unprivelaged/unprivileged/
Alexandre Abreu 2012/04/27 14:46:52 Done.
179 183
180 <ol> 184 <ol>
181 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li> 185 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li>
182 <li> If the leftmost icon in the Console says "Show Log List", click that icon . A second column appears at the left. </li> 186 <li> If the leftmost icon in the Console says "Show Log List", click that icon . A second column appears at the left. </li>
183 <li> Click "Console Messages" in the left pane. </li> 187 <li> Click "Console Messages" in the left pane. </li>
184 <li> Search for the string <b>Can not read external extensions</b>. If there is a problem reading the external extensions file, you will find an error messag e. Look for another error message directly above it, which should explain the i ssue. For example, if you see the following error: 188 <li> Search for the string <b>Can not read external extensions</b>. If there is a problem reading the external extensions file, you will find an error messag e. Look for another error message directly above it, which should explain the i ssue. For example, if you see the following error:
Finnur 2012/04/27 14:29:43 s/file/files/ s/find/see/
Finnur 2012/04/27 14:56:09 Missed a couple here. :) On 2012/04/27 14:29:43,
Alexandre Abreu 2012/04/27 15:03:13 Done.
185 "Path /Library/Application Support/Google/Chrome is owned by the wrong grou p", you need to use <code>chgrp</code> or the Finder's Get Info dialog to change the directory's group owner to the Administrator group.</li> 189 "Path /Library/Application Support/Google/Chrome is owned by the wrong grou p", you need to use <code>chgrp</code> or the Finder's Get Info dialog to change the directory's group owner to the Administrator group.</li>
186 <li> After fixing the issue, relaunch Chrome. Test that the external extensio n is now installed. It is possible that one permissions error keeps Chrome from detecting a second error. If the external extension was not installed, repeat these steps until you do not see an error in the Console application. 190 <li> After fixing the issue, relaunch Chrome. Test that the external extensio n is now installed. It is possible that one permissions error keeps Chrome from detecting a second error. If the external extension was not installed, repeat these steps until you do not see an error in the Console application.
187 </ol> 191 </ol>
188 192
189 <h2 id="registry">Using the Windows registry</h2> 193 <h2 id="registry">Using the Windows registry</h2>
190 194
191 <ol> 195 <ol>
192 <li>Make the <code>.crx</code> extension file available 196 <li>Make the <code>.crx</code> extension file available
193 to the machine you want to install the extension on. 197 to the machine you want to install the extension on.
194 (Copy it to a local directory or to a network share &mdash; 198 (Copy it to a local directory or to a network share &mdash;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 each time the browser starts, and makes 231 each time the browser starts, and makes
228 any necessary changes to the installed 232 any necessary changes to the installed
229 external extensions. </p> 233 external extensions. </p>
230 234
231 <p>To update your extension to a new version, 235 <p>To update your extension to a new version,
232 update the file, and then update the version 236 update the file, and then update the version
233 in the preferences or registry. </p> 237 in the preferences or registry. </p>
234 238
235 <p>To uninstall your extension 239 <p>To uninstall your extension
236 (for example, if your software is uninstalled), 240 (for example, if your software is uninstalled),
237 remove the metadata from the preferences file 241 remove the metadata from the preferences file
Finnur 2012/04/27 14:29:43 ... remove your preference file (aaaaaaaaaabbbbbbb
Finnur 2012/04/27 14:56:09 And this one. On 2012/04/27 14:29:43, Finnur wrot
Alexandre Abreu 2012/04/27 15:03:13 Done.
Finnur 2012/04/27 15:34:16 Not quite... Read it again. :) On 2012/04/27 15:0
Alexandre Abreu 2012/04/27 15:40:38 Oops, went too fast over this one. Done.
238 or registry. </p> 242 or registry. </p>
239 243
240 <h2 id="faq">FAQ</h2> 244 <h2 id="faq">FAQ</h2>
241 245
242 <p> 246 <p>
243 This section answers common questions about external extensions. 247 This section answers common questions about external extensions.
244 </p> 248 </p>
245 249
246 <br> 250 <br>
247 251
248 <p><b>Can I specify a URL as a path to the external extension?</b> </p> 252 <p><b>Can I specify a URL as a path to the external extension?</b> </p>
249 <p>Yes, if you use a <a href="#preferences">preferences JSON</a> file. The 253 <p>Yes, if you use a <a href="#preferences">preferences JSON</a> file. The
250 extension must be hosted as explained in <a href="hosting.html">hosting</a>. 254 extension must be hosted as explained in <a href="hosting.html">hosting</a>.
251 Use the "external_update_url" property to point to an 255 Use the "external_update_url" property to point to an
252 <a href="autoupdate.html#H2-2">update manifest</a> that has the URL for your 256 <a href="autoupdate.html#H2-2">update manifest</a> that has the URL for your
253 extension.</p> 257 extension.</p>
254 258
255 <br> 259 <br>
256 260
257 <p><b>What are some common mistakes when installing with the preferences 261 <p><b>What are some common mistakes when installing with the preferences
258 file?</b></p> 262 file?</b></p>
259 <ul> 263 <ul>
260 <li> 264 <li>
261 Not specifying the same id/version 265 Not specifying the same id/version
262 as the one listed in the <code>.crx</code> </li> 266 as the one listed in the <code>.crx</code> </li>
263 <li> 267 <li>
264 <code>external_extensions.json</code> is in the wrong location </li> 268 <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> files (where <code>aaaaaaaa aabbbbbbbbbbcccccccccc</code>
269 is the extension's ID) are in the wrong location or the specified extension IDs are not valid</li>
Finnur 2012/04/27 14:29:43 Suggest: The .json file (<code>aaaaaaaaaabbbbbbbbb
Alexandre Abreu 2012/04/27 14:46:52 Done.
265 <li> 270 <li>
266 Syntax error in JSON file 271 Syntax error in JSON file
267 (forgetting to separate entries with comma or 272 (forgetting to separate entries with comma or
268 leaving a trailing comma somewhere) </li> 273 leaving a trailing comma somewhere) </li>
269 <li> 274 <li>
270 Extra curly brackets around the top level dictionary </li>
271 <li>
272 JSON file entry points to the wrong path 275 JSON file entry points to the wrong path
273 to the <code>.crx</code> (or path specified but no filename) </li> 276 to the <code>.crx</code> (or path specified but no filename) </li>
274 <li> 277 <li>
275 Backslashes in UNC path not escaped 278 Backslashes in UNC path not escaped
276 (for example, <code>"\\server\share\file"</code> is wrong; 279 (for example, <code>"\\server\share\file"</code> is wrong;
277 it should be <code>"\\\\server\\share\\extension"</code>) </li> 280 it should be <code>"\\\\server\\share\\extension"</code>) </li>
278 <li> 281 <li>
279 Permissions problems on a network share </li> 282 Permissions problems on a network share </li>
280 </ul> 283 </ul>
281 284
(...skipping 18 matching lines...) Expand all
300 303
301 <br> 304 <br>
302 305
303 <p><b>How do I get off the blacklist?</b> </p> 306 <p><b>How do I get off the blacklist?</b> </p>
304 <p>If the user uninstalls your extension, you should respect that 307 <p>If the user uninstalls your extension, you should respect that
305 decision. However, if you (the developer) accidentally uninstalled 308 decision. However, if you (the developer) accidentally uninstalled
306 your extension through the UI, 309 your extension through the UI,
307 you can remove the blacklist tag 310 you can remove the blacklist tag
308 by installing the extension normally 311 by installing the extension normally
309 through the UI, and then uninstalling it. </p> 312 through the UI, and then uninstalling it. </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698