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

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

Issue 132433007: Updates to hosting docs inline with policy changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 <h1>Other Deployment Options</h1> 1 <h1>Other Deployment Options</h1>
2 2
3
4 <p> 3 <p>
5 Usually, users install their own extensions. 4 Usually, users install their own extensions.
6 But sometimes you might want an extension 5 But sometimes you might want an extension
7 to be installed automatically. 6 to be installed automatically.
8 Here are two typical cases: 7 Here are two typical cases:
9 </p> 8 </p>
10 9
11 <ul> 10 <ul>
12 <li> 11 <li>
13 An extension is associated with some other software, 12 An extension is associated with some other software,
14 and the extension should be installed 13 and the extension should be installed
15 whenever the user installs that other software. 14 whenever the user installs that other software.
16 The extension could also be uninstalled 15 The extension could also be uninstalled
17 when the user removes that other software. 16 when the user removes that other software.
18 </li> 17 </li>
19 <li> 18 <li>
20 A network admin wants to install the same extensions 19 A network admin wants to install the same extensions
21 throughout the company. 20 throughout the company.
22 </li> 21 </li>
23 </ul> 22 </ul>
24 23
25 <p> 24 <p>
26 An extension that's installed automatically is known as an 25 An extension that's installed automatically is known as an
27 <em>external extension</em>. 26 <em>external extension</em>.
28 Google Chrome supports two ways of 27 Google Chrome supports two ways of
29 installing external extensions: 28 installing external extensions:
30 </p> 29 </p>
31 30
32 <ul> 31 <ul>
33 <li> Using a preferences JSON file </li> 32 <li> Using a preferences JSON file (Mac OS X and Linux only)</li>
34 <li> Using the Windows registry (Windows only) </li> 33 <li> Using the Windows registry (Windows only) </li>
35 </ul> 34 </ul>
36 35
37 <p> 36 <p>
38 Both ways support installing an extension from a <code>.crx</code> extension 37 Both ways support installing an extension hosted at an
39 file on the user's computer. The preferences JSON file also supports installing 38 <code>update_URL</code>.
40 an extension hosted at an 39 In the Windows registry,
41 <a href="autoupdate.html#update_url">update URL</a>. 40 the <code>update_URL</code> must point to the Chrome Web Store
42 See <a href="hosting.html">hosting</a> for details on hosting an extension. 41 where the extension is hosted.
42 </p>
43
44 <p>
45 In the preferences file,
46 it can point to your own server where you are hosting the extension
47 (see <a href="autoupdate.html#update_url">autoupdating</a>).
48 The preferences JSON file also supports installing
49 an extension from a <code>.crx</code> extension
50 file on the user's computer
51 (see <a href="hosting.html">hosting</a>).
52 </p>
53
54
55 <p class="note">
56 <b>Install extensions from your website:</b>
57 The safest option for your users is to publish your extension
58 in the Chrome Web Store.
59 Instead of hosting your own extension,
60 publish it in the store, and link to the store install using
61 <a href="https://developers.google.com/chrome/web-store/docs/inline_installation ">inline installation</a>.
43 </p> 62 </p>
44 63
45 <h2 id="prereqs">Before you begin</h2> 64 <h2 id="prereqs">Before you begin</h2>
46 65
47 <p> 66 <p>
48 First, package a 67 First, <a href="/webstore/publish.html">publish</a>
49 <a href="packaging.html"><code>.crx</code> file</a> 68 the extension in the Chrome Web Store,
69 or package a <a href="packaging.html"><code>.crx</code> file</a>
50 and make sure that it installs successfully. 70 and make sure that it installs successfully.
51 </p> 71 </p>
72
73
74 <p class="warning">
75 <b>Windows installs must come from Chrome Web Store:</b><br>
76 As of Chrome 33,
77 no external installs are allowed from a path to a local <code>.crx</code>
78 (see <a href="http://blog.chromium.org/2013/11/protecting-windows-users-from-mal icious.html">Protecting Windows users from malicious extensions</a>).
79 </p>
80
52 <p> 81 <p>
53 If you wish to install from an 82 If installing from an
54 <a href="autoupdate.html#update_url">update URL</a>, ensure that the extension 83 <a href="autoupdate.html#update_url">update URL</a>, ensure that the extension
55 is properly <a href="hosting.html">hosted</a>. 84 is properly <a href="hosting.html">hosted</a>.
56 </p> 85 </p>
57 86
58 <p> 87 <p>
59 Then, before you edit the preferences file or the registry, 88 Before you edit the preferences file or the registry,
60 make a note of the following: 89 make a note of the following:
61 </p> 90 </p>
62 91
63 <ul> 92 <ul>
64 <li> The intended <b>location</b> of the extension's <code>.crx</code> file, 93 <li> The intended <b>location</b> of the extension's <code>.crx</code> file,
65 or the update URL from which it is served </li> 94 or the update URL from which it is served </li>
66 <li> The extension's <b>version</b> 95 <li> The extension's <b>version</b>
67 (from the manifest file or the <b>chrome://extensions</b> page) </li> 96 (from the manifest file or the <b>chrome://extensions</b> page) </li>
68 <li> The extension's <b>ID</b> 97 <li> The extension's <b>ID</b>
69 (from the <b>chrome://extensions</b> page 98 (from the <b>chrome://extensions</b> page
70 when you've loaded the packed extension) </li> 99 when you've loaded the packed extension) </li>
71 </ul> 100 </ul>
72 101
73 <p> 102 <p>
74 The following examples assume the version is <code>1.0</code> 103 The following examples assume the version is <code>1.0</code>
75 and the ID is <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>. 104 and the ID is <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>.
76 </p> 105 </p>
77 106
78 <h2 id="preferences">Using a preferences file</h2> 107 <h2 id="preferences">Using a preferences file</h2>
79 108
80 <p class="note"> 109 <br>
81 <b>Windows note:</b>
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>
84 instead of the preferences file.
85 </p>
86 110
87 <p class="note"> 111 <p class="note">
88 <b>Note:</b> 112 <b>Mac OS X and Linux only:</b>
89 Previous versions of Google Chrome used an 113 Do not use the preferences file for Windows.
90 <code>external_extensions.json</code> file to specify which extensions to 114 Use <a href="#registry">Windows registry</a> instead.
91 install. This file has been deprecated in favor of individual <code>.json</code>
92 files, one per extension.
93 </p> 115 </p>
94 116
95 <ol> 117 <ol>
96 <li>If you are installing from a file, make the <code>.crx</code> extension 118 <li>If you are installing from a file, make the <code>.crx</code> extension
97 file available to the machine you want to install the extension on. 119 file available to the machine you want to install the extension on.
98 (Copy it to a local directory or to a network share for example, 120 (Copy it to a local directory or to a network share for example,
99 <code>\\server\share\extension.crx</code> 121 <code>\\server\share\extension.crx</code>
100 or <code>/home/share/extension.crx</code>.) 122 or <code>/home/share/extension.crx</code>.)
101 </li> 123 </li>
102 124
103 <li>Create a file with the following name in one of the folders listed below: 125 <li>Create a file with the following name in one of the folders listed below:
104 <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> where the file name (without the extension) 126 <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> where the file name (without the extension)
105 corresponds to your extension's ID. 127 corresponds to your extension's ID.
106 The location depends on the operating system. 128 The location depends on the operating system.
107 <dl> 129 <dl>
108 <dt> Windows: </dt>
109 <dd> <code><em>chrome_root</em>\Application\<em>chrome_version</em>\Extensio ns\</code>
110 <br />
111 Example: <code>c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0 \Extensions\</code>
112 </dd>
113 <dt> Mac OS X:</dt> 130 <dt> Mac OS X:</dt>
114 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br> 131 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br>
115 For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code> 132 For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code>
116 <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> 133 <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>
117 <p class="note"> 134 <p class="note">
118 <b>Note:</b> The above path for all users was added in Chrome 16. Prior ver sions used a different path:<br/> 135 <b>Note:</b> The above path for all users was added in Chrome 16. Prior ver sions used a different path:<br/>
119 <code>/Applications/Google Chrome.app/Contents/Extensions/</code> 136 <code>/Applications/Google Chrome.app/Contents/Extensions/</code>
120 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p> 137 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p>
121 </dd> 138 </dd>
122 139
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 If another browser locale is selected that is not supported by the extension, 184 If another browser locale is selected that is not supported by the extension,
168 the external extensions will be uninstalled. If "supported_locales" list 185 the external extensions will be uninstalled. If "supported_locales" list
169 is missing, the extension will be installed for any locale. 186 is missing, the extension will be installed for any locale.
170 </p> 187 </p>
171 Example: 188 Example:
172 <pre>{ 189 <pre>{
173 "external_update_url": "http://myhost.com/mytestextension/updates.xml", 190 "external_update_url": "http://myhost.com/mytestextension/updates.xml",
174 "supported_locales": [ "en", "fr", "de" ] 191 "supported_locales": [ "en", "fr", "de" ]
175 }</pre> 192 }</pre>
176 </li> 193 </li>
177 <li>Save the JSON file. </li> 194 <li>Save the JSON file.</li>
178 <li>Launch Google Chrome and go to <b>chrome://extensions</b>; 195 <li>Launch Google Chrome and go to <b>chrome://extensions</b>;
179 you should see the extension listed. </li> 196 you should see the extension listed. </li>
180 </ol> 197 </ol>
181 198
199 <p class="note">
200 <b>Note:</b>
201 Previous versions of Google Chrome used an
202 <code>external_extensions.json</code> file to specify which extensions to
203 install. This file has been deprecated in favor of individual <code>.json</code>
204 files, one per extension.
205 </p>
206
182 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3> 207 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3>
183 208
184 <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> 209 <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>
185 210
186 <ol> 211 <ol>
187 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li> 212 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li>
188 <li> If the leftmost icon in the Console says "Show Log List", click that icon . A second column appears at the left. </li> 213 <li> If the leftmost icon in the Console says "Show Log List", click that icon . A second column appears at the left. </li>
189 <li> Click "Console Messages" in the left pane. </li> 214 <li> Click "Console Messages" in the left pane. </li>
190 <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: 215 <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:
191 "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> 216 "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>
192 <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. 217 <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.
193 </ol> 218 </ol>
194 219
195 <h2 id="registry">Using the Windows registry</h2> 220 <h2 id="registry">Using the Windows registry</h2>
196 221
197 <ol> 222 <ol>
198 <li>Make the <code>.crx</code> extension file available
199 to the machine you want to install the extension on.
200 (Copy it to a local directory or to a network share &mdash;
201 for example, <code>\\server\share\extension.crx</code>.)
202 </li>
203 <li>Find or create the following key in the 223 <li>Find or create the following key in the
204 registry: 224 registry:
205 <ul> 225 <ul>
206 <li> 32-bit Windows: <code>HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extension s</code> </li> 226 <li> 32-bit Windows: <code>HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extension s</code> </li>
207 <li> 64-bit Windows: <code>HKEY_LOCAL_MACHINE\Software\Wow6432Node\Google\Chro me\Extensions</code> </li> 227 <li> 64-bit Windows: <code>HKEY_LOCAL_MACHINE\Software\Wow6432Node\Google\Chro me\Extensions</code> </li>
208 </ul> 228 </ul>
209 </li> 229 </li>
210 230
211 <li>Create a new key (folder) 231 <li>Create a new key (folder)
212 under the <b>Extensions</b> key with the 232 under the <b>Extensions</b> key with the
213 same name as the ID of your extension 233 same name as the ID of your extension
214 (for example, <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>). 234 (for example, <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>).
215 </li> 235 </li>
216 <li>Create two string values (<code>REG_SZ</code>) named "path" and "version", 236 <li>In your extension key,
217 and set them to the extension's location and version. 237 create a property, "update_url", and set it to the value:
218 For example: 238 "https://clients2.google.com/service/update2/crx"
219 <ul> 239 (this points to your extension's crx in the Chrome Web Store):
220 <li>path: <code>\\server\share\extension.crx</code> </li> 240 <pre>{
221 <li>version: <code>1.0</code> </li> 241 "update_url": "https://clients2.google.com/service/update2/crx"
222 </ul> 242 }</pre>
223 </li> 243 </li>
224 <li>Launch the browser and go to 244 <li>Launch the browser and go to
225 <b>chrome://extensions</b>; you should 245 <b>chrome://extensions</b>; you should
226 see the extension listed. </li> 246 see the extension listed. </li>
227 </ol> 247 </ol>
228 248
229 <h2 id="updating">Updating and uninstalling</h2> 249 <h2 id="updating">Updating and uninstalling</h2>
230 250
231 <p>Google Chrome scans the metadata entries 251 <p>Google Chrome scans the metadata entries
232 in the preferences and registry 252 in the preferences and registry
233 each time the browser starts, and makes 253 each time the browser starts, and makes
234 any necessary changes to the installed 254 any necessary changes to the installed
235 external extensions. </p> 255 external extensions. </p>
236 256
237 <p>To update your extension to a new version, 257 <p>To update your extension to a new version,
238 update the file, and then update the version 258 update the file, and then update the version
239 in the preferences or registry. </p> 259 in the preferences or registry. </p>
240 260
241 <p>To uninstall your extension 261 <p>To uninstall your extension
242 (for example, if your software is uninstalled), 262 (for example, if your software is uninstalled),
243 remove your preference file (aaaaaaaaaabbbbbbbbbbcccccccccc.json) 263 remove your preference file (aaaaaaaaaabbbbbbbbbbcccccccccc.json)
244 or the metadata from the registry. </p> 264 or the metadata from the registry. </p>
245 265
246 <h2 id="faq">FAQ</h2> 266 <h2 id="faq">FAQ</h2>
247 267
248 <p> 268 <p>
249 This section answers common questions about external extensions. 269 This section answers common questions about external extensions.
250 </p> 270 </p>
251 271
252 <br> 272 <p><b>Will the methodology for allowing a “pre-install” still be supported
273 by Google Chrome from M33 onwards?</b></p>
274 <p>Yes, but only as an install from a Chrome Web Store
275 <code>update_URL</code>,
276 not from a local file path.</p>
253 277
254 <p><b>Can I specify a URL as a path to the external extension?</b> </p> 278 <p><b>Can I specify a URL as a path to the external extension?</b> </p>
255 <p>Yes, if you use a <a href="#preferences">preferences JSON</a> file. The 279 <p>Yes, use the <a href="#preferences">preferences JSON</a> file
256 extension must be hosted as explained in <a href="hosting.html">hosting</a>. 280 for Mac OS X and Linux; the <a href=#"registry">registry</a> for Windows.
257 Use the "external_update_url" property to point to an 281 The extension must be hosted as explained in
282 <a href="hosting.html">hosting</a>.
283 In the preferences file,
284 use the "external_update_url" property to point to an
258 <a href="autoupdate.html#update_manifest">update manifest</a> that has the URL f or your 285 <a href="autoupdate.html#update_manifest">update manifest</a> that has the URL f or your
259 extension.</p> 286 extension.
260 287 In the Windows registry,
261 <br> 288 use the "update_url" property.</p>
262 289
263 <p><b>What are some common mistakes when installing with the preferences 290 <p><b>What are some common mistakes when installing with the preferences
264 file?</b></p> 291 file?</b></p>
265 <ul> 292 <ul>
266 <li> 293 <li>
267 Not specifying the same id/version 294 Not specifying the same id/version
268 as the one listed in the <code>.crx</code> </li> 295 as the one listed in the <code>.crx</code> </li>
269 <li> 296 <li>
270 The .json file (<code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code>) is in 297 The .json file (<code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code>) is in
271 the wrong location or the ID specified does not match the extension ID. 298 the wrong location or the ID specified does not match the extension ID.
272 <li> 299 <li>
273 Syntax error in JSON file 300 Syntax error in JSON file
274 (forgetting to separate entries with comma or 301 (forgetting to separate entries with comma or
275 leaving a trailing comma somewhere) </li> 302 leaving a trailing comma somewhere) </li>
276 <li> 303 <li>
277 JSON file entry points to the wrong path 304 JSON file entry points to the wrong path
278 to the <code>.crx</code> (or path specified but no filename) </li> 305 to the <code>.crx</code> (or path specified but no filename) </li>
279 <li> 306 <li>
280 Backslashes in UNC path not escaped 307 Backslashes in UNC path not escaped
281 (for example, <code>"\\server\share\file"</code> is wrong; 308 (for example, <code>"\\server\share\file"</code> is wrong;
282 it should be <code>"\\\\server\\share\\extension"</code>) </li> 309 it should be <code>"\\\\server\\share\\extension"</code>) </li>
283 <li> 310 <li>
284 Permissions problems on a network share </li> 311 Permissions problems on a network share </li>
285 </ul> 312 </ul>
286 313
287 <br>
288
289 <p><b>What are some common mistakes when installing with the registry?</b> </p> 314 <p><b>What are some common mistakes when installing with the registry?</b> </p>
290 <ul> 315 <ul>
291 <li>Not specifying the same id/version 316 <li>Not specifying the same id/version
292 as the one listed in the <code>.crx</code> </li> 317 as the one listed in the Chrome Web Store </li>
293 <li>Key created in the wrong location in the registry </li> 318 <li>Key created in the wrong location in the registry </li>
294 <li>Registry entry points to the wrong path to the <code>.crx</code> file 319 <li>Registry entry points to the wrong path
295 (or path specified but no filename) </li> 320 to the <code>.crx</code> file in the Chrome Web Store</li>
296 <li>Permissions problems on a network share </li> 321 <li>Permissions problems on a network share </li>
297 </ul> 322 </ul>
298 323
299 <br> 324 <p><b>How do I update my native binaries and extension in-step?</b></p>
325 <p>Previously when off-store extensions were supported,
326 it was possible to have the native binaries and the extension be updated in lock step.
327 However, extensions hosted on the Chrome Web Store are updated
328 via the Chrome update mechanism which developers do not control.
329 Extension developers should be careful about updating extensions
330 that have a dependency on the native binary
331 (for example, legacy extensions using <a href="npapi.html">NPAPI</a>).
332 </p>
300 333
301 <p><b>What if the user uninstalls the extension?</b> </p> 334 <p><b>What if the user uninstalls the extension?</b> </p>
302 <p>If the user uninstalls the extension through the UI, it will no 335 <p>If the user uninstalls the extension through the UI, it will no
303 longer be installed or updated on each startup. In other words, the 336 longer be installed or updated on each startup. In other words, the
304 external extension is blacklisted. </p> 337 external extension is blacklisted. </p>
305 338
306 <br>
307
308 <p><b>How do I get off the blacklist?</b> </p> 339 <p><b>How do I get off the blacklist?</b> </p>
309 <p>If the user uninstalls your extension, you should respect that 340 <p>If the user uninstalls your extension, you should respect that
310 decision. However, if you (the developer) accidentally uninstalled 341 decision. However, if you (the developer) accidentally uninstalled
311 your extension through the UI, 342 your extension through the UI,
312 you can remove the blacklist tag 343 you can remove the blacklist tag
313 by installing the extension normally 344 by installing the extension normally
314 through the UI, and then uninstalling it. </p> 345 through the UI, and then uninstalling it. </p>
346
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698