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

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.
saroop 2014/01/16 22:16:17 Should we link to the registry approach for Window
mkearney1 2014/01/21 21:17:17 Done.
90 <code>external_extensions.json</code> file to specify which extensions to
91 install. This file has been deprecated in favor of individual <code>.json</code>
92 files, one per extension.
93 </p> 114 </p>
94 115
95 <ol> 116 <ol>
96 <li>If you are installing from a file, make the <code>.crx</code> extension 117 <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. 118 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, 119 (Copy it to a local directory or to a network share for example,
99 <code>\\server\share\extension.crx</code> 120 <code>\\server\share\extension.crx</code>
100 or <code>/home/share/extension.crx</code>.) 121 or <code>/home/share/extension.crx</code>.)
101 </li> 122 </li>
102 123
103 <li>Create a file with the following name in one of the folders listed below: 124 <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) 125 <code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code> where the file name (without the extension)
105 corresponds to your extension's ID. 126 corresponds to your extension's ID.
106 The location depends on the operating system. 127 The location depends on the operating system.
107 <dl> 128 <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> 129 <dt> Mac OS X:</dt>
114 <dd>For a specific user: <code>~USERNAME/Library/Application Support/Google/ Chrome/External Extensions/</code><br> 130 <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> 131 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> 132 <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"> 133 <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/> 134 <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> 135 <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> 136 This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p>
121 </dd> 137 </dd>
122 138
(...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, 183 If another browser locale is selected that is not supported by the extension,
168 the external extensions will be uninstalled. If "supported_locales" list 184 the external extensions will be uninstalled. If "supported_locales" list
169 is missing, the extension will be installed for any locale. 185 is missing, the extension will be installed for any locale.
170 </p> 186 </p>
171 Example: 187 Example:
172 <pre>{ 188 <pre>{
173 "external_update_url": "http://myhost.com/mytestextension/updates.xml", 189 "external_update_url": "http://myhost.com/mytestextension/updates.xml",
174 "supported_locales": [ "en", "fr", "de" ] 190 "supported_locales": [ "en", "fr", "de" ]
175 }</pre> 191 }</pre>
176 </li> 192 </li>
177 <li>Save the JSON file. </li> 193 <li>Save the JSON file.</li>
178 <li>Launch Google Chrome and go to <b>chrome://extensions</b>; 194 <li>Launch Google Chrome and go to <b>chrome://extensions</b>;
179 you should see the extension listed. </li> 195 you should see the extension listed. </li>
180 </ol> 196 </ol>
181 197
198 <p class="note">
199 <b>Note:</b>
200 Previous versions of Google Chrome used an
201 <code>external_extensions.json</code> file to specify which extensions to
202 install. This file has been deprecated in favor of individual <code>.json</code>
203 files, one per extension.
204 </p>
205
182 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3> 206 <h3 id="troubleshooting">Troubleshooting Mac OS permissions problems</h3>
183 207
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> 208 <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 209
186 <ol> 210 <ol>
187 <li> Launch the Console program. You can find it under /Applications/Utilitie s/Console. </li> 211 <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> 212 <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> 213 <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: 214 <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> 215 "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. 216 <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> 217 </ol>
194 218
195 <h2 id="registry">Using the Windows registry</h2> 219 <h2 id="registry">Using the Windows registry</h2>
196 220
197 <ol> 221 <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 222 <li>Find or create the following key in the
204 registry: 223 registry:
205 <ul> 224 <ul>
206 <li> 32-bit Windows: <code>HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extension s</code> </li> 225 <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> 226 <li> 64-bit Windows: <code>HKEY_LOCAL_MACHINE\Software\Wow6432Node\Google\Chro me\Extensions</code> </li>
208 </ul> 227 </ul>
209 </li> 228 </li>
210 229
211 <li>Create a new key (folder) 230 <li>Create a new key (folder)
212 under the <b>Extensions</b> key with the 231 under the <b>Extensions</b> key with the
213 same name as the ID of your extension 232 same name as the ID of your extension
214 (for example, <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>). 233 (for example, <code>aaaaaaaaaabbbbbbbbbbcccccccccc</code>).
215 </li> 234 </li>
216 <li>Create two string values (<code>REG_SZ</code>) named "path" and "version", 235 <li>In your extension key,
217 and set them to the extension's location and version. 236 create a property, "update_url", and set it to the value:
218 For example: 237 "https://clients2.google.com/service/update2/crx"
219 <ul> 238 (this points to your extension's crx in the Chrome Web Store):
220 <li>path: <code>\\server\share\extension.crx</code> </li> 239 <pre>{
221 <li>version: <code>1.0</code> </li> 240 "update_url": "https://clients2.google.com/service/update2/crx"
222 </ul> 241 }</pre>
223 </li> 242 </li>
224 <li>Launch the browser and go to 243 <li>Launch the browser and go to
225 <b>chrome://extensions</b>; you should 244 <b>chrome://extensions</b>; you should
226 see the extension listed. </li> 245 see the extension listed. </li>
227 </ol> 246 </ol>
228 247
229 <h2 id="updating">Updating and uninstalling</h2> 248 <h2 id="updating">Updating and uninstalling</h2>
230 249
231 <p>Google Chrome scans the metadata entries 250 <p>Google Chrome scans the metadata entries
232 in the preferences and registry 251 in the preferences and registry
233 each time the browser starts, and makes 252 each time the browser starts, and makes
234 any necessary changes to the installed 253 any necessary changes to the installed
235 external extensions. </p> 254 external extensions. </p>
236 255
237 <p>To update your extension to a new version, 256 <p>To update your extension to a new version,
238 update the file, and then update the version 257 update the file, and then update the version
239 in the preferences or registry. </p> 258 in the preferences or registry. </p>
240 259
241 <p>To uninstall your extension 260 <p>To uninstall your extension
242 (for example, if your software is uninstalled), 261 (for example, if your software is uninstalled),
243 remove your preference file (aaaaaaaaaabbbbbbbbbbcccccccccc.json) 262 remove your preference file (aaaaaaaaaabbbbbbbbbbcccccccccc.json)
244 or the metadata from the registry. </p> 263 or the metadata from the registry. </p>
245 264
246 <h2 id="faq">FAQ</h2> 265 <h2 id="faq">FAQ</h2>
247 266
248 <p> 267 <p>
249 This section answers common questions about external extensions. 268 This section answers common questions about external extensions.
250 </p> 269 </p>
251 270
252 <br> 271 <p><b>Will the methodology for allowing a “pre-install” still be supported
272 by Google Chrome from M33 onwards?</b></p>
273 <p>Yes, but only as an install from a Chrome Web Store
274 <code>update_URL</code>,
275 not from a local file path.</p>
253 276
254 <p><b>Can I specify a URL as a path to the external extension?</b> </p> 277 <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 278 <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>. 279 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 280 The extension must be hosted as explained in
281 <a href="hosting.html">hosting</a>.
282 In the preferences file,
283 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 284 <a href="autoupdate.html#update_manifest">update manifest</a> that has the URL f or your
259 extension.</p> 285 extension.
260 286 In the Windows registry,
261 <br> 287 use the "update_url" property.</p>
262 288
263 <p><b>What are some common mistakes when installing with the preferences 289 <p><b>What are some common mistakes when installing with the preferences
264 file?</b></p> 290 file?</b></p>
265 <ul> 291 <ul>
266 <li> 292 <li>
267 Not specifying the same id/version 293 Not specifying the same id/version
268 as the one listed in the <code>.crx</code> </li> 294 as the one listed in the <code>.crx</code> </li>
269 <li> 295 <li>
270 The .json file (<code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code>) is in 296 The .json file (<code>aaaaaaaaaabbbbbbbbbbcccccccccc.json</code>) is in
271 the wrong location or the ID specified does not match the extension ID. 297 the wrong location or the ID specified does not match the extension ID.
272 <li> 298 <li>
273 Syntax error in JSON file 299 Syntax error in JSON file
274 (forgetting to separate entries with comma or 300 (forgetting to separate entries with comma or
275 leaving a trailing comma somewhere) </li> 301 leaving a trailing comma somewhere) </li>
276 <li> 302 <li>
277 JSON file entry points to the wrong path 303 JSON file entry points to the wrong path
278 to the <code>.crx</code> (or path specified but no filename) </li> 304 to the <code>.crx</code> (or path specified but no filename) </li>
279 <li> 305 <li>
280 Backslashes in UNC path not escaped 306 Backslashes in UNC path not escaped
281 (for example, <code>"\\server\share\file"</code> is wrong; 307 (for example, <code>"\\server\share\file"</code> is wrong;
282 it should be <code>"\\\\server\\share\\extension"</code>) </li> 308 it should be <code>"\\\\server\\share\\extension"</code>) </li>
283 <li> 309 <li>
284 Permissions problems on a network share </li> 310 Permissions problems on a network share </li>
285 </ul> 311 </ul>
286 312
287 <br>
288
289 <p><b>What are some common mistakes when installing with the registry?</b> </p> 313 <p><b>What are some common mistakes when installing with the registry?</b> </p>
290 <ul> 314 <ul>
291 <li>Not specifying the same id/version 315 <li>Not specifying the same id/version
292 as the one listed in the <code>.crx</code> </li> 316 as the one listed in the Chrome Web Store </li>
293 <li>Key created in the wrong location in the registry </li> 317 <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 318 <li>Registry entry points to the wrong path
295 (or path specified but no filename) </li> 319 to the <code>.crx</code> file in the Chrome Web Store</li>
296 <li>Permissions problems on a network share </li> 320 <li>Permissions problems on a network share </li>
297 </ul> 321 </ul>
298 322
299 <br> 323 <p><b>How do I update my native binaries and extension in-step?</b></p>
324 <p>Previously when off-store extensions were supported,
325 it was possible to have the native binaries and the extension be updated in lock step.
326 However, extensions hosted on the Chrome Web Store are updated
327 via the Chrome update mechanism which developers do not control.
328 Extension developers should be careful about updating extensions
329 that have a dependency on the native binary
330 (for example, legacy extensions using <a href="npapi.html">NPAPI</a>).
331 </p>
300 332
301 <p><b>What if the user uninstalls the extension?</b> </p> 333 <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 334 <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 335 longer be installed or updated on each startup. In other words, the
304 external extension is blacklisted. </p> 336 external extension is blacklisted. </p>
305 337
306 <br>
307
308 <p><b>How do I get off the blacklist?</b> </p> 338 <p><b>How do I get off the blacklist?</b> </p>
309 <p>If the user uninstalls your extension, you should respect that 339 <p>If the user uninstalls your extension, you should respect that
310 decision. However, if you (the developer) accidentally uninstalled 340 decision. However, if you (the developer) accidentally uninstalled
311 your extension through the UI, 341 your extension through the UI,
312 you can remove the blacklist tag 342 you can remove the blacklist tag
313 by installing the extension normally 343 by installing the extension normally
314 through the UI, and then uninstalling it. </p> 344 through the UI, and then uninstalling it. </p>
345
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698