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

Side by Side Diff: chrome/common/extensions/docs/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, 8 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 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform 2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the 3 across api docs and should be edited only with knowledge of the
4 templating mechanism. 4 templating mechanism.
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
6 browser, it will be re-generated from the template, json schema and 6 browser, it will be re-generated from the template, json schema and
7 authored overview content. 7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this 8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines. 9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 The following examples assume the version is <code>1.0</code> 286 The following examples assume the version is <code>1.0</code>
287 and the ID is <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>. 287 and the ID is <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>.
288 </p> 288 </p>
289 <h2 id="preferences">Using a preferences file</h2> 289 <h2 id="preferences">Using a preferences file</h2>
290 <p class="note"> 290 <p class="note">
291 <b>Windows note:</b> 291 <b>Windows note:</b>
292 Until <a href="http://crbug.com/41902">bug 41902</a> is fixed, 292 Until <a href="http://crbug.com/41902">bug 41902</a> is fixed,
293 you might want to use the <a href="#registry">Windows registry</a> 293 you might want to use the <a href="#registry">Windows registry</a>
294 instead of the preferences file. 294 instead of the preferences file.
295 </p> 295 </p>
296 <p class="note">
297 <b>Note:</b>
298 Previous versions of Google Chrome used an
299 <code>external_extensions.json</code> file to specify which extensions to
300 install. This file has been deprecated in favor of individual <code>.json</code>
301 files, one per extension.
302 </p>
296 <ol> 303 <ol>
297 <li>If you are installing from a file, make the <code>.crx</code> extension 304 <li>If you are installing from a file, make the <code>.crx</code> extension
298 file available to the machine you want to install the extension on. 305 file available to the machine you want to install the extension on.
299 (Copy it to a local directory or to a network share for example, 306 (Copy it to a local directory or to a network share for example,
300 <code>\\server\share\extension.crx</code> 307 <code>\\server\share\extension.crx</code>
301 or <code>/home/share/extension.crx</code>.) 308 or <code>/home/share/extension.crx</code>.)
302 </li> 309 </li>
303 <li>Locate the <code>external_extensions.json</code> file. 310 <li>Create a file with the following name in one of the folders listed below:
304 If the file doesn't exist, create it. 311 <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> where the file name (without the extension)
312 corresponds to your extension's ID.
305 The location depends on the operating system. 313 The location depends on the operating system.
306 <dl> 314 <dl>
307 <dt> Windows: </dt> 315 <dt> Windows: </dt>
308 <dd> <code><em>chrome_root</em>\Application\<em>chrome_version</em>\Extensio ns\</code> 316 <dd> <code><em>chrome_root</em>\Application\<em>chrome_version</em>\Extensio ns\</code>
309 <br> 317 <br>
310 Example: <code>c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0 \Extensions\</code> 318 Example: <code>c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0 \Extensions\</code>
311 </dd> 319 </dd>
312 <dt> Mac OS X:</dt> 320 <dt> Mac OS X:</dt>
313 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br> 321 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br>
314 For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code> 322 For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code>
315 <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> 323 <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>
316 <p class="note"> 324 <p class="note">
317 <b>Note:</b> The above path for all users was added in Chrome 16. Prior ver sions used a different path:<br> 325 <b>Note:</b> The above path for all users was added in Chrome 16. Prior ver sions used a different path:<br>
318 <code>/Applications/Google Chrome.app/Contents/Extensions/</code> 326 <code>/Applications/Google Chrome.app/Contents/Extensions/</code>
319 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p> 327 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p>
320 </dd> 328 </dd>
321 <dt> Linux: </dt> 329 <dt> Linux: </dt>
322 <dd> <code>/opt/google/chrome/extensions/</code> <br> 330 <dd> <code>/opt/google/chrome/extensions/</code> <br>
331 </dd>
332 <dd> <code>/usr/share/google-chrome/extensions/</code> <br>
323 <b>Note:</b> Use <code>chmod</code> if necessary 333 <b>Note:</b> Use <code>chmod</code> if necessary
324 to make sure that <code>extensions/external_extensions.json</code> 334 to make sure that the <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> files
325 is world-readable. 335 are world-readable.
326 </dd> 336 </dd>
327 </dl> 337 </dl>
328 </li> 338 </li>
329 <li> Add an entry to <code>external_extensions.json</code> 339 <li>If you are installing from a file, specify the extension's location and vers ion with fields
330 for your extension's ID. If you are installing from a file, specify the 340 named "external_crx" and "external_version" in the file created above.
331 extension's location and version with fields named "external_crx" and 341 <p>
332 "external_version".
333 Example: 342 Example:
334 <pre>{ 343 </p><pre> {
335 "aaaaaaaaaabbbbbbbbbbcccccccccc": {
336 "external_crx": "/home/share/extension.crx", 344 "external_crx": "/home/share/extension.crx",
337 "external_version": "1.0" 345 "external_version": "1.0"
338 } 346 }
339 }</pre> 347 </pre>
348 <p></p>
340 <p class="note"> 349 <p class="note">
341 <b>Note:</b> 350 <b>Note:</b>
342 You need to escape 351 You need to escape
343 each <code>\</code> character in the location. 352 each <code>\</code> character in the location.
344 For example, 353 For example,
345 <code>\\server\share\extension.crx</code> would be 354 <code>\\server\share\extension.crx</code> would be
346 <code>"\\\\server\\share\\extension.crx"</code>. 355 <code>"\\\\server\\share\\extension.crx"</code>.
347 </p> 356 </p>
348 <p> 357 <p>
358 </p><p>
349 If you are installing from an update URL, specify the extension's update URL 359 If you are installing from an update URL, specify the extension's update URL
350 with field name "external_update_url". 360 with field name "external_update_url".
351 </p> 361 </p>
352 Example: 362 Example:
353 <pre>{ 363 <pre>{
354 "aaaaaaaaaabbbbbbbbbbcccccccccc": { 364 "external_update_url": "http://myhost.com/mytestextension/updates.xml"
355 "external_update_url": "http://myhost.com/mytestextension/updates.xml"
356 }
357 }</pre> 365 }</pre>
358 <p> 366 <p>
359 If you would like to install extension only for some browser locales, 367 If you would like to install extension only for some browser locales,
360 you can list supported locales in field name "supported_locale". Locale may 368 you can list supported locales in field name "supported_locale". Locale may
361 specify parent locale like "en", in this case the extension will be 369 specify parent locale like "en", in this case the extension will be
362 installed for all English locales like "en-US", "en-GB", etc. 370 installed for all English locales like "en-US", "en-GB", etc.
363 If another browser locale is selected that is not supported by the extension, 371 If another browser locale is selected that is not supported by the extension,
364 the external extensions will be uninstalled. If "supported_locales" list 372 the external extensions will be uninstalled. If "supported_locales" list
365 is missing, the extension will be installed for any locale. 373 is missing, the extension will be installed for any locale.
366 </p> 374 </p>
367 Example: 375 Example:
368 <pre>{ 376 <pre>{
369 "aaaaaaaaaabbbbbbbbbbcccccccccc": { 377 "external_update_url": "http://myhost.com/mytestextension/updates.xml",
370 "external_update_url": "http://myhost.com/mytestextension/updates.xml", 378 "supported_locales": [ "en", "fr", "de" ]
371 "supported_locales": [ "en", "fr", "de" ]
372 }
373 }</pre> 379 }</pre>
374 </li> 380 </li>
375 <li>Save the JSON file. </li> 381 <li>Save the JSON file. </li>
376 <li>Launch Google Chrome and go to <b>chrome://extensions</b>; 382 <li>Launch Google Chrome and go to <b>chrome://extensions</b>;
377 you should see the extension listed. </li> 383 you should see the extension listed. </li>
378 </ol> 384 </ol>
379 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3> 385 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3>
380 <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> 386 <p>On Mac OS, the external extensions files for all users are only read if file system permissions prevent unprivileged users from changing it. If you do not s ee external extensions installed when Chrome is launched, there may be a permiss ions problem with the external extensions preferences files. To see if this is the problem, follow these steps:</p>
381 <ol> 387 <ol>
382 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li> 388 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li>
383 <li> If the leftmost icon in the Console says "Show Log List", click that icon . A second column appears at the left. </li> 389 <li> If the leftmost icon in the Console says "Show Log List", click that icon . A second column appears at the left. </li>
384 <li> Click "Console Messages" in the left pane. </li> 390 <li> Click "Console Messages" in the left pane. </li>
385 <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: 391 <li> Search for the string <b>Can not read external extensions</b>. If there is a problem reading the external extensions files, you will see 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:
386 "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> 392 "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>
387 <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. 393 <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.
388 </li></ol> 394 </li></ol>
389 <h2 id="registry">Using the Windows registry</h2> 395 <h2 id="registry">Using the Windows registry</h2>
390 <ol> 396 <ol>
391 <li>Make the <code>.crx</code> extension file available 397 <li>Make the <code>.crx</code> extension file available
392 to the machine you want to install the extension on. 398 to the machine you want to install the extension on.
393 (Copy it to a local directory or to a network share — 399 (Copy it to a local directory or to a network share —
394 for example, <code>\\server\share\extension.crx</code>.) 400 for example, <code>\\server\share\extension.crx</code>.)
395 </li> 401 </li>
(...skipping 25 matching lines...) Expand all
421 <p>Google Chrome scans the metadata entries 427 <p>Google Chrome scans the metadata entries
422 in the preferences and registry 428 in the preferences and registry
423 each time the browser starts, and makes 429 each time the browser starts, and makes
424 any necessary changes to the installed 430 any necessary changes to the installed
425 external extensions. </p> 431 external extensions. </p>
426 <p>To update your extension to a new version, 432 <p>To update your extension to a new version,
427 update the file, and then update the version 433 update the file, and then update the version
428 in the preferences or registry. </p> 434 in the preferences or registry. </p>
429 <p>To uninstall your extension 435 <p>To uninstall your extension
430 (for example, if your software is uninstalled), 436 (for example, if your software is uninstalled),
431 remove the metadata from the preferences file 437 remove your preference file (aaaaaaaaaabbbbbbbbbbcccccccccc.json)
432 or registry. </p> 438 or the metadata from the registry. </p>
433 <h2 id="faq">FAQ</h2> 439 <h2 id="faq">FAQ</h2>
434 <p> 440 <p>
435 This section answers common questions about external extensions. 441 This section answers common questions about external extensions.
436 </p> 442 </p>
437 <br> 443 <br>
438 <p><b>Can I specify a URL as a path to the external extension?</b> </p> 444 <p><b>Can I specify a URL as a path to the external extension?</b> </p>
439 <p>Yes, if you use a <a href="#preferences">preferences JSON</a> file. The 445 <p>Yes, if you use a <a href="#preferences">preferences JSON</a> file. The
440 extension must be hosted as explained in <a href="hosting.html">hosting</a>. 446 extension must be hosted as explained in <a href="hosting.html">hosting</a>.
441 Use the "external_update_url" property to point to an 447 Use the "external_update_url" property to point to an
442 <a href="autoupdate.html#H2-2">update manifest</a> that has the URL for your 448 <a href="autoupdate.html#H2-2">update manifest</a> that has the URL for your
443 extension.</p> 449 extension.</p>
444 <br> 450 <br>
445 <p><b>What are some common mistakes when installing with the preferences 451 <p><b>What are some common mistakes when installing with the preferences
446 file?</b></p> 452 file?</b></p>
447 <ul> 453 <ul>
448 <li> 454 <li>
449 Not specifying the same id/version 455 Not specifying the same id/version
450 as the one listed in the <code>.crx</code> </li> 456 as the one listed in the <code>.crx</code> </li>
451 <li> 457 <li>
452 <code>external_extensions.json</code> is in the wrong location </li> 458 The .json file (<code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code>) is in
453 <li> 459 the wrong location or the ID specified does not match the extension ID.
460 </li><li>
454 Syntax error in JSON file 461 Syntax error in JSON file
455 (forgetting to separate entries with comma or 462 (forgetting to separate entries with comma or
456 leaving a trailing comma somewhere) </li> 463 leaving a trailing comma somewhere) </li>
457 <li> 464 <li>
458 Extra curly brackets around the top level dictionary </li>
459 <li>
460 JSON file entry points to the wrong path 465 JSON file entry points to the wrong path
461 to the <code>.crx</code> (or path specified but no filename) </li> 466 to the <code>.crx</code> (or path specified but no filename) </li>
462 <li> 467 <li>
463 Backslashes in UNC path not escaped 468 Backslashes in UNC path not escaped
464 (for example, <code>"\\server\share\file"</code> is wrong; 469 (for example, <code>"\\server\share\file"</code> is wrong;
465 it should be <code>"\\\\server\\share\\extension"</code>) </li> 470 it should be <code>"\\\\server\\share\\extension"</code>) </li>
466 <li> 471 <li>
467 Permissions problems on a network share </li> 472 Permissions problems on a network share </li>
468 </ul> 473 </ul>
469 <br> 474 <br>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 _uff=0; 527 _uff=0;
523 urchinTracker(); 528 urchinTracker();
524 } 529 }
525 catch(e) {/* urchinTracker not available. */} 530 catch(e) {/* urchinTracker not available. */}
526 </script> 531 </script>
527 <!-- end analytics --> 532 <!-- end analytics -->
528 </div> 533 </div>
529 </div> <!-- /gc-footer --> 534 </div> <!-- /gc-footer -->
530 </div> <!-- /gc-container --> 535 </div> <!-- /gc-container -->
531 </body></html> 536 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/common/extensions/docs/static/external_extensions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698