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

Side by Side Diff: chrome/common/extensions/docs/autoupdate.html

Issue 398005: Changes to follow the codesite L&F.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 <!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>
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js"> 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js">
15 </script> 15 </script>
16 <script type="text/javascript" src="js/api_page_generator.js"></script> 16 <script type="text/javascript" src="js/api_page_generator.js"></script>
17 <script type="text/javascript" src="js/bootstrap.js"></script> 17 <script type="text/javascript" src="js/bootstrap.js"></script>
18 <title>Autoupdating</title></head><body> <div id="container"> 18 <title>Autoupdating</title></head><body> <div id="gc-container" class="labs">
19 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> 19 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
20 <!-- In particular, sub-templates that recurse, must be used by allowing 20 <!-- In particular, sub-templates that recurse, must be used by allowing
21 jstemplate to make a copy of the template in this section which 21 jstemplate to make a copy of the template in this section which
22 are not operated on by way of the jsskip="true" --> 22 are not operated on by way of the jsskip="true" -->
23 <div style="display:none"> 23 <div style="display:none">
24 24
25 <!-- VALUE --> 25 <!-- VALUE -->
26 <div id="valueTemplate"> 26 <div id="valueTemplate">
27 <dt> 27 <dt>
28 <var>paramName</var> 28 <var>paramName</var>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 <div> 61 <div>
62 <div> 62 <div>
63 </div> 63 </div>
64 </div> 64 </div>
65 </dl> 65 </dl>
66 </dd> 66 </dd>
67 </div> <!-- /VALUE --> 67 </div> <!-- /VALUE -->
68 68
69 </div> <!-- /SUBTEMPLATES --> 69 </div> <!-- /SUBTEMPLATES -->
70 70
71 <a name="top"> </a> 71 <a id="top"></a>
72 <div id="skipto">
73 <a href="#gc-pagecontent">Skip to page content</a>
74 <a href="#gc-toc">Skip to main navigation</a>
75 </div>
72 <!-- API HEADER --> 76 <!-- API HEADER -->
73 <div id="pageHeader"> 77 <div id="gc-header">
74 <div id="searchbox"> 78 <div id="logo">
75 <form action="http://www.google.com/cse" id="cse-search-box"> 79
76 <div> 80
81 <img src="images/code_labs_logo.gif" height="43" width="161" alt="Googl e Code Labs" style="border:0;">
82
83
84 </div>
85 <div id="search">
86 <div id="searchForm" class="searchForm">
87 <form action="http://www.google.com/cse" id="cse">
88 <div id="gsc-search-box">
77 <input type="hidden" name="cx" value="002967670403910741006:61_cvzfq tno"> 89 <input type="hidden" name="cx" value="002967670403910741006:61_cvzfq tno">
78 <input type="hidden" name="ie" value="UTF-8"> 90 <input type="hidden" name="ie" value="UTF-8">
79 <input type="text" name="q" size="31"> 91 <input type="text" name="q" size="31">
80 <input type="submit" name="sa" value="Search"> 92 <input class="gsc-search-button" type="submit" name="sa" value="Sear ch">
81 </div> 93 </div>
82 </form> 94 </form>
95 <p>&nbsp;</p>
96 </div> <!-- end searchForm -->
83 97
84 <script type="text/javascript" src="http://www.google.com/jsapi"></scrip t> 98 <script type="text/javascript" src="http://www.google.com/jsapi"></scrip t>
85 <script type="text/javascript">google.load("elements", "1", {packages: " transliteration"});</script> 99 <script type="text/javascript">google.load("elements", "1", {packages: " transliteration"});</script>
86 <script type="text/javascript" src="http://www.google.com/coop/cse/t13n? form=cse-search-box&amp;t13n_langs=en"></script> 100 <script type="text/javascript" src="http://www.google.com/coop/cse/t13n? form=cse&amp;t13n_langs=en"></script>
87 <script type="text/javascript" src="http://www.google.com/coop/cse/brand ?form=cse-search-box&amp;lang=en"></script> 101 <script type="text/javascript" src="http://www.google.com/coop/cse/brand ?form=cse&amp;lang=en"></script>
88 </div> 102 </div> <!-- end search -->
89 <div id="pageTitle"> 103 </div> <!-- end gc-header -->
90 <h1>Autoupdating</h1>
91 </div>
92 </div> <!-- /pageHeader -->
93 104
94 <div id="pageContent"> 105 <div id="codesiteContent">
106
107 <a id="gc-topnav-anchor"></a>
108 <div id="gc-topnav">
109 <h1>Google Chrome Extensions (<a href="/labs/">Labs</a>)</h1>
110 <ul id="home" class="gc-topnav-tabs">
111 <li id="home_link">
112 <a href="index.html" class="selected" title="Google Chrome Extension s documentation home page">Home</a>
113 </li>
114 <li id="blog_link">
115 <a href="http://blog.chromium.org/" title="Chromium blog">Blog</a>
116 </li>
117 <li id="faq_link">
118 <a href="faq.html" title="Google Chrome Extensions FAQ">FAQ</a>
119 </li>
120 <li id="group_link">
121 <a href="http://groups.google.com/group/chromium-extensions" title=" Chromium-Extensions group">Group</a>
122 </li>
123 <li id="terms_link">
124 Terms
125 </li>
126 </ul>
127 </div> <!-- end gc-topnav -->
128
129 <div class="g-section g-tpl-170">
95 <!-- SIDENAV --> 130 <!-- SIDENAV -->
96 <div id="leftNav"> 131 <div class="g-unit g-first" id="gc-toc">
97 <ul> 132 <ul>
98 <li> <a href="index.html">Home</a></li> 133 <li><a href="index.html">Home</a></li>
99 <li> <a href="getstarted.html">Getting Started</a></li> 134 <li><a href="getstarted.html">Getting Started</a></li>
100 <li> <a href="overview.html">Overview</a></li> 135 <li><a href="overview.html">Overview</a></li>
101 <li> <a href="devguide.html"><div>Developer's Guide</div></a> 136 <li><h2><a href="devguide.html">Developer's Guide</a></h2>
102 <ul> 137 <ul>
103 <li> Browser UI 138 <li>Browser UI
104 <ul> 139 <ul>
105 <li><a href="browserAction.html">Browser Actions</a></li> 140 <li><a href="browserAction.html">Browser Actions</a></li>
106 <li><a href="options.html">Options Pages</a></li> 141 <li><a href="options.html">Options Pages</a></li>
107 <li><a href="override.html">Override Pages</a></li> 142 <li><a href="override.html">Override Pages</a></li>
108 <li><a href="pageAction.html">Page Actions</a></li> 143 <li><a href="pageAction.html">Page Actions</a></li>
109 <li><a href="themes.html">Themes</a></li> 144 <li><a href="themes.html">Themes</a></li>
110 </ul> 145 </ul>
111 </li> 146 </li>
112 <li> Browser Interaction 147 <li>Browser Interaction
113 <ul> 148 <ul>
114 <li><a href="bookmarks.html">Bookmarks</a></li> 149 <li><a href="bookmarks.html">Bookmarks</a></li>
115 <li><a href="events.html">Events</a></li> 150 <li><a href="events.html">Events</a></li>
116 <li><a href="tabs.html">Tabs</a></li> 151 <li><a href="tabs.html">Tabs</a></li>
117 <li><a href="windows.html">Windows</a></li> 152 <li><a href="windows.html">Windows</a></li>
118 </ul> 153 </ul>
119 </li> 154 </li>
120 <li> Implementation 155 <li>Implementation
121 <ul> 156 <ul>
122 <li><a href="background_pages.html">Background Pages</a></li> 157 <li><a href="background_pages.html">Background Pages</a></li>
123 <li><a href="content_scripts.html">Content Scripts</a></li> 158 <li><a href="content_scripts.html">Content Scripts</a></li>
124 <li><a href="xhr.html">Cross-Origin XHR</a></li> 159 <li><a href="xhr.html">Cross-Origin XHR</a></li>
125 <li><a href="messaging.html">Message Passing</a></li> 160 <li><a href="messaging.html">Message Passing</a></li>
126 <li><a href="npapi.html">NPAPI Plugins</a></li> 161 <li><a href="npapi.html">NPAPI Plugins</a></li>
127 </ul> 162 </ul>
128 </li> 163 </li>
129 <li> Finishing 164 <li>Finishing
130 <ul> 165 <ul>
131 <li class="leftNavSelected">Autoupdating</li> 166 <li class="leftNavSelected">Autoupdating</li>
132 <li><a href="packaging.html">Packaging</a></li> 167 <li><a href="packaging.html">Packaging</a></li>
133 </ul> 168 </ul>
134 </li> 169 </li>
135 </ul> 170 </ul>
136 </li> 171 </li>
137 <li><a href="tutorials.html"><div>Tutorials</div></a> 172 <li><h2><a href="tutorials.html">Tutorials</a></h2>
138 <ul> 173 <ul>
139 <li><a href="tut_debugging.html">Debugging</a></li> 174 <li><a href="tut_debugging.html">Debugging</a></li>
140 </ul> 175 </ul>
141 </li> 176 </li>
142 <li>Reference 177 <li><h2>Reference</h2>
143 <ul> 178 <ul>
144 <li> Formats 179 <li>Formats
145 <ul> 180 <ul>
146 <li><a href="manifest.html">Manifest Files</a></li> 181 <li><a href="manifest.html">Manifest Files</a></li>
147 <li><a href="match_patterns.html">Match Patterns</a></li> 182 <li><a href="match_patterns.html">Match Patterns</a></li>
148 <!-- <li>Packages (.crx)</li> --> 183 <!-- <li>Packages (.crx)</li> -->
149 </ul> 184 </ul>
150 </li> 185 </li>
151 <li> <a href="api_index.html">chrome.* APIs</a> </li> 186 <li><a href="api_index.html">chrome.* APIs</a></li>
152 <li> <a href="api_other.html">Other APIs</a> </li> 187 <li><a href="api_other.html">Other APIs</a></li>
153 </ul> 188 </ul>
154 </li> 189 </li>
155 <li><a href="samples.html">Samples</a></li> 190 <li><h2><a href="samples.html">Samples</a></h2></li>
156 </ul> 191 </ul>
157 </div> 192 </div>
158 193
159 <div id="mainColumn"> 194 <div class="g-unit" id="gc-pagecontent">
195 <div id="pageTitle">
196 <h1 class="page_title">Autoupdating</h1>
197 </div>
160 <!-- TABLE OF CONTENTS --> 198 <!-- TABLE OF CONTENTS -->
161 <div id="toc"> 199 <div id="toc">
162 <p>Contents</p> 200 <h2>Contents</h2>
163 <ol> 201 <ol>
164 <li> 202 <li>
165 <a href="#H2-0">Introduction</a> 203 <a href="#H2-0">Overview</a>
166 <ol> 204 <ol>
167 <li style="display: none; "> 205 <li style="display: none; ">
168 <a>h3Name</a> 206 <a>h3Name</a>
169 </li> 207 </li>
170 </ol> 208 </ol>
171 </li><li> 209 </li><li>
172 <a href="#H2-1">Overview</a> 210 <a href="#H2-1">Update URL</a>
211 <ol>
212 <li style="display: none; ">
213 <a>h3Name</a>
214 </li>
215 </ol>
216 </li><li>
217 <a href="#H2-2">Update manifest</a>
218 <ol>
219 <li style="display: none; ">
220 <a>h3Name</a>
221 </li>
222 </ol>
223 </li><li>
224 <a href="#H2-3">Testing</a>
225 <ol>
226 <li style="display: none; ">
227 <a>h3Name</a>
228 </li>
229 </ol>
230 </li><li>
231 <a href="#H2-4">Advanced usage: request parameters</a>
173 <ol> 232 <ol>
174 <li> 233 <li>
175 <a href="#H3-2">Update URL</a> 234 <a href="#H3-5">Future work</a>
176 </li><li> 235 </li>
177 <a href="#H3-3">Update Manifest</a> 236 </ol>
178 </li><li> 237 </li><li>
179 <a href="#H3-4">Testing</a> 238 <a href="#H2-6">Advanced usage: minimum browser version</a>
180 </li><li> 239 <ol>
181 <a href="#H3-5">Advanced Usage : Request Parameters</a> 240 <li style="display: none; ">
182 </li><li> 241 <a>h3Name</a>
183 <a href="#H3-6">Advanced Usage : Minimum Browser Version</a>
184 </li> 242 </li>
185 </ol> 243 </ol>
186 </li> 244 </li>
187 <div style="display: none; "> 245 <div style="display: none; ">
188 <li> 246 <li>
189 <a href="#apiReference">API reference</a> 247 <a href="#apiReference">API reference</a>
190 <ol> 248 <ol>
191 <li> 249 <li>
192 <a href="#properties">Properties</a> 250 <a href="#properties">Properties</a>
193 <ol> 251 <ol>
(...skipping 29 matching lines...) Expand all
223 </ol> 281 </ol>
224 </li> 282 </li>
225 </div> 283 </div>
226 </ol> 284 </ol>
227 </div> 285 </div>
228 <!-- /TABLE OF CONTENTS --> 286 <!-- /TABLE OF CONTENTS -->
229 287
230 <!-- STATIC CONTENT PLACEHOLDER --> 288 <!-- STATIC CONTENT PLACEHOLDER -->
231 <div id="static"><div id="pageData-title" class="pageData">Autoupdating< /div> 289 <div id="static"><div id="pageData-title" class="pageData">Autoupdating< /div>
232 <div id="pageData-showTOC" class="pageData">true</div> 290 <div id="pageData-showTOC" class="pageData">true</div>
233 <a name="H2-0"></a><h2>Introduction</h2>
234 <p>We want extensions to be autoupdated for some of the same reasons as chrome i tself: to incorporate bug and security fixes, add new features or performance en hancements, and improve user interfaces.</p>
235 291
236 <p>For extensions packaged and distributed via the extensions gallery, developer s will be able to use a web interface to release updated versions of their exten sions and do not need to concern themselves with the rest of this document.</p> 292 <p>We want extensions to be autoupdated for some of the same reasons as Google C hrome itself: to incorporate bug and security fixes, add new features or perform ance enhancements, and improve user interfaces.</p>
293
294 <p>For extensions packaged and distributed via the gallery, developers will be a ble to use a web interface to release updated versions of their extensions and d o not need to concern themselves with the rest of this document.</p>
237 295
238 <p>Those who choose to host extensions themselves instead of using the gallery w ill probably want to use autoupdate for their extensions as described below. You might want to make sure you are familiar with <a href="packaging.html">Packagin g</a> first.</p> 296 <p>Those who choose to host extensions themselves instead of using the gallery w ill probably want to use autoupdate for their extensions as described below. You might want to make sure you are familiar with <a href="packaging.html">Packagin g</a> first.</p>
239 297
240 298
241 <a name="H2-1"></a><h2>Overview</h2> 299 <a name="H2-0"></a><h2>Overview</h2>
242 <ul><li>An extension manifest may contain an "update_url" for doing update check s.</li> 300 <ul><li>An extension manifest may contain an "update_url" for doing update check s.</li>
243 <li>The content returned by an update check is an "update manifest" xml document listing the latest version of an extension (or set of extensions, more on that later).</li></ul> 301 <li>The content returned by an update check is an "update manifest" XML document listing the latest version of an extension (or set of extensions, more on that later).</li></ul>
244 302
245 <p>Every few hours, the browser will check if any installed extensions have an a utoupdate url. For each one, it will make a request to that url looking for an u pdate manifest xml file. If the update manifest mentions a version of an extensi on that is more recent than what's installed, it will download and install the n ew version. Similar to manual updates, the new crx must be signed with the same private key as the currently installed version.</p> 303 <p>Every few hours, the browser will check if any installed extensions have an a utoupdate URL. For each one, it will make a request to that URL looking for an u pdate manifest XML file. If the update manifest mentions a version of an extensi on that is more recent than what's installed, it will download and install the n ew version. Similar to manual updates, the new crx must be signed with the same private key as the currently installed version.</p>
246 304
247 305
248 <a name="H3-2"></a><h3>Update URL</h3> 306 <a name="H2-1"></a><h2>Update URL</h2>
249 <p>For those who are hosting their own extensions, you need to add the "update_u rl" key to your <a href="manifest.html">manifest.json</a> file like this:</p> 307 <p>For those who are hosting their own extensions, you need to add the "update_u rl" key to your <a href="manifest.html">manifest.json</a> file like this:</p>
250 <pre>{ 308 <pre>{
251 ... 309 ...
252 "update_url": "http://myhost.com/mytestextension/updates.xml", 310 "update_url": "http://myhost.com/mytestextension/updates.xml",
253 ... 311 ...
254 } 312 }
255 </pre> 313 </pre>
256 314
257 <a name="H3-3"></a><h3>Update Manifest</h3> 315 <a name="H2-2"></a><h2>Update manifest</h2>
258 <p>The "update manifest" returned by the server&nbsp;should be an xml document t hat looks like this (parts you'll want to modify highlighted):</p> 316 <p>The "update manifest" returned by the server&nbsp;should be an XML document t hat looks like this (parts you'll want to modify highlighted):</p>
259 317
260 <pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt; 318 <pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
261 &lt;gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'&gt; 319 &lt;gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'&gt;
262 &lt;app appid='<b>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</b>'&gt; 320 &lt;app appid='<b>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</b>'&gt;
263 &nbsp;&lt;updatecheck&nbsp;codebase='<b>http://myhost.com/mytestextension/mte _v2.crx</b>'&nbsp;version='<b>2.0</b>' /&gt; 321 &nbsp;&lt;updatecheck&nbsp;codebase='<b>http://myhost.com/mytestextension/mte _v2.crx</b>'&nbsp;version='<b>2.0</b>' /&gt;
264 &lt;/app&gt; 322 &lt;/app&gt;
265 &lt;/gupdate&gt; 323 &lt;/gupdate&gt;
266 </pre> 324 </pre>
267 325
268 <p>(This xml format is borrowed from that used by Omaha, Google's update infrast ructure. See <a href="http://code.google.com/p/omaha/">http://code.google.com/p/ omaha/</a> for more details.)</p> 326 <p>(This XML format is borrowed from that used by Omaha, Google's update infrast ructure. See <a href="http://code.google.com/p/omaha/">http://code.google.com/p/ omaha/</a> for more details.)</p>
269 327
270 <p><b>appid</b><br> 328 <p><b>appid</b><br>
271 The 'appid' property is the extension id, generated based on a hash of the exten sion's public key as described in <a href="packaging.html">Packaging</a>. You ca n find out the id of your extension by going to chrome://extensions/ in a chrome browser where you have the extension installed.</p> 329 The 'appid' property is the extension id, generated based on a hash of the exten sion's public key as described in <a href="packaging.html">Packaging</a>. You ca n find out the id of your extension by going to <b>chrome://extensions</b>.</p>
272 330
273 <p><b>codebase</b><br> 331 <p><b>codebase</b><br>
274 The 'codebase' property is a url to the crx file.</p> 332 The 'codebase' property is a URL to the crx file.</p>
275 333
276 <p><b>version</b><br> 334 <p><b>version</b><br>
277 This is used by the client to determine whether it should download the crx file at 'codebase'. It should match the version parameter in the crx file's manifest. json file.</p> 335 This is used by the client to determine whether it should download the crx file at 'codebase'. It should match the version parameter in the crx file's manifest. json file.</p>
278 <p>The update manifest xml file may contain information about multiple extension s by including multiple <code>&lt;app&gt;</code> tags.</p> 336 <p>The update manifest XML file may contain information about multiple extension s by including multiple <code>&lt;app&gt;</code> tags.</p>
279 337
280 338
281 <a name="H3-4"></a><h3>Testing</h3> 339 <a name="H2-3"></a><h2>Testing</h2>
282 <p>The default update check frequency is several hours, which obviously makes te sting challenging. To overcome this, you can use the --extensions-update-frequen cy command line flag to set a more frequent interval in seconds. For instance, t o make checks run every 45 seconds, you would run chrome like this:</p> 340 <p>The default update check frequency is several hours,
341 but you can force an update using the Extensions page's
342 <b>Update extensions now</b> button.
343 </p>
344
345 <p>
346 Another option is to use the --extensions-update-frequency command-line flag to set a more frequent interval in seconds. For instance, to make checks run every 45 seconds, you would run Google Chrome like this:</p>
283 <pre>chrome.exe <b>--extensions-update-frequency=45</b></pre> 347 <pre>chrome.exe <b>--extensions-update-frequency=45</b></pre>
284 348
285 <p>Note that this affects checks for all installed extensions, so consider the b andwidth and server load implications of this. You may want to temporarily unins tall all but the one extension you are testing with, and should not run with thi s option turned on during normal browser usage. In the future we may remove this command flag and replace it with a different mechanism to trigger update checks for testing (perhaps a button on the chrome://extensions page). Star the follow ing issue to receive updates: <a href="http://crbug.com/17853" rel="nofollow">ht tp://crbug.com/17853</a>.</p> 349 <p>Note that this affects checks for all installed extensions, so consider the b andwidth and server load implications of this. You may want to temporarily unins tall all but the one extension you are testing with, and should not run with thi s option turned on during normal browser usage.</p>
286
287 <p><b>Addendum:</b> the "Update now" button has been added, and will be present in dev channel builds soon (likely 4.0.207.x and above).</p>
288 350
289 351
290 <a name="H3-5"></a><h3>Advanced Usage : Request Parameters</h3> 352 <a name="H2-4"></a><h2>Advanced usage: request parameters</h2>
291 <p>The basic autoupdate mechanism is designed to make the server-side work as ea sy as just dropping a static xml file onto any plain webserver such as apache, a nd updating that xml file as you release new versions of your extension(s).</p> 353 <p>The basic autoupdate mechanism is designed to make the server-side work as ea sy as just dropping a static XML file onto any plain webserver such as apache, a nd updating that XML file as you release new versions of your extension(s).</p>
292 <p>More advanced developers may wish to take advantage of the fact that we add o n parameters to the request for the update manifest to indicate the extension id and version. Then they can use the same update_url for all of their extensions pointing to a url running dynamic server side code instead of a static xml file. </p> 354 <p>More advanced developers may wish to take advantage of the fact that we add o n parameters to the request for the update manifest to indicate the extension id and version. Then they can use the same update_url for all of their extensions pointing to a URL running dynamic server side code instead of a static XML file. </p>
293 <p>The format of the request parameters is:</p> 355 <p>The format of the request parameters is:</p>
294 <p><code>&nbsp;&nbsp;?x=&lt;extension_data&gt;</code></p> 356 <p><code>&nbsp;&nbsp;?x=&lt;extension_data&gt;</code></p>
295 <p>where <code>&lt;extension_data&gt;</code> is an url-encoded string of the for mat:</p> 357 <p>where <code>&lt;extension_data&gt;</code> is an URL-encoded string of the for mat:</p>
296 <p><code>&nbsp;&nbsp;id=&lt;id&gt;&amp;v=&lt;version&gt;</code></p> 358 <p><code>&nbsp;&nbsp;id=&lt;id&gt;&amp;v=&lt;version&gt;</code></p>
297 359
298 <p>So for example, say we have two extensions installed</p> 360 <p>So for example, say we have two extensions installed</p>
299 <p>&nbsp;&nbsp;Extension 1 with id "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" and versio n "1.1"<br> 361 <p>&nbsp;&nbsp;Extension 1 with id "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" and versio n "1.1"<br>
300 &nbsp;&nbsp;Extension 2 with id "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" and version " 0.4"</p> 362 &nbsp;&nbsp;Extension 2 with id "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" and version " 0.4"</p>
301 363
302 <p>and that both point at the same update_url: <code>http://test.com/extension_u pdates.php</code></p> 364 <p>and that both point at the same update_url: <code>http://test.com/extension_u pdates.php</code></p>
303 365
304 <p>The two requests made would be:</p> 366 <p>The two requests made would be:</p>
305 <code>http://test.com/extension_updates.php?x=id%3Daaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa%26v%3D1.1</code> 367 <code>http://test.com/extension_updates.php?x=id%3Daaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa%26v%3D1.1</code>
306 <br> 368 <br>
307 <code>http://test.com/extension_updates.php?x=id%3Dbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbb%26v%3D0.4</code> 369 <code>http://test.com/extension_updates.php?x=id%3Dbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbb%26v%3D0.4</code>
308 370
309 <p><b>Note</b>: in releases before 3.0.196.x there was a bug in how request para meters were put together (<a href="http://crbug.com/17469" rel="nofollow">http:/ /crbug.com/17469</a>).</p> 371 <p><b>Note</b>: in releases before 3.0.196.x there was a bug in how request para meters were put together (<a href="http://crbug.com/17469" rel="nofollow">http:/ /crbug.com/17469</a>).</p>
310 372
311 <h4>Future work for Request Parameters</h4> 373 <a name="H3-5"></a><h3>Future work</h3>
312 <p>While not implemented yet, we will eventually list multiple extensions in a s ingle request for each unique update_url. For the above example, the request wou ld end up being:</p> 374 <p>While not implemented yet, we will eventually list multiple extensions in a s ingle request for each unique update_url. For the above example, the request wou ld end up being:</p>
313 <p><code>http://test.com/extension_updates.php?x=id%3Daaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa%26v%3D1.1&amp;x=id%3Dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%26v%3D0.4</code></p > 375 <p><code>http://test.com/extension_updates.php?x=id%3Daaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa%26v%3D1.1&amp;x=id%3Dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%26v%3D0.4</code></p >
314 376
315 <p>If the number of installed extensions using the same update_url is large enou gh that a GET request url would be too long (probably greater than 1024 characte rs or so), the update check will instead issue a POST with the request parameter s in the POST body.</p> 377 <p>If the number of installed extensions using the same update_url is large enou gh that a GET request URL would be too long (probably greater than 1024 characte rs or so), the update check will instead issue a POST with the request parameter s in the POST body.</p>
316 378
317 379
318 <a name="H3-6"></a><h3>Advanced Usage : Minimum Browser Version</h3> 380 <a name="H2-6"></a><h2>Advanced usage: minimum browser version</h2>
319 <p>As we add more API's to the extensions system, it's possible you will want to release an updated version of an extension that will only work with newer versi ons of the chrome browser. While chrome itself is autoupdated, it can take a few days before the majority of the userbase has updated to any given new release. To ensure that a given extension update will only apply to chrome version at or higher than a specific version, you would add the prodversionmin parameter to th e <code>&lt;app&gt;</code> tag in your update manifest. For example:</p> 381 <p>As we add more APIs to the extensions system, it's possible you will want to release an updated version of an extension that will only work with newer versio ns of the browser. While Google Chrome itself is autoupdated, it can take a few days before the majority of the user base has updated to any given new release. To ensure that a given extension update will apply only to Google Chrome version s at or higher than a specific version, you would add the prodversionmin paramet er to the <code>&lt;app&gt;</code> tag in your update manifest. For example:</p>
320 382
321 <pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt; 383 <pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
322 &lt;gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'&gt; 384 &lt;gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'&gt;
323 &nbsp;&nbsp;&lt;app appid='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'&gt; 385 &nbsp;&nbsp;&lt;app appid='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'&gt;
324 &nbsp;&nbsp; &nbsp;&lt;updatecheck&nbsp;codebase='http://myhost.com/mytestextens ion/mte_v2.crx'&nbsp;version='2.0' <b>prodversionmin='3.0.193.0'</b>/&gt; 386 &nbsp;&nbsp; &nbsp;&lt;updatecheck&nbsp;codebase='http://myhost.com/mytestextens ion/mte_v2.crx'&nbsp;version='2.0' <b>prodversionmin='3.0.193.0'</b>/&gt;
325 &nbsp;&nbsp;&lt;/app&gt; 387 &nbsp;&nbsp;&lt;/app&gt;
326 &lt;/gupdate&gt; 388 &lt;/gupdate&gt;
327 </pre> 389 </pre>
328 390
329 <p>This would ensure that users of this extension would only autoupdate to versi on 2 if they are running chrome 3.0.193.0 or greater.</p> 391 <p>This would ensure that users of this extension would autoupdate to version 2 only if they are running Google Chrome 3.0.193.0 or greater.</p>
330 392
331 </div> 393 </div>
332 394
333 <!-- API PAGE --> 395 <!-- API PAGE -->
334 <div class="apiPage" style="display: none; "> 396 <div class="apiPage" style="display: none; ">
335 <a name="apiReference"></a> 397 <a name="apiReference"></a>
336 <h2>API reference: chrome.apiname </h2> 398 <h2>API reference: chrome.apiname </h2>
337 399
338 <!-- PROPERTIES --> 400 <!-- PROPERTIES -->
339 <div class="apiGroup"> 401 <div class="apiGroup">
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 <h4>type name</h4> 527 <h4>type name</h4>
466 528
467 <div> 529 <div>
468 </div> 530 </div>
469 531
470 </div> <!-- /apiItem --> 532 </div> <!-- /apiItem -->
471 533
472 </div> <!-- /apiGroup --> 534 </div> <!-- /apiGroup -->
473 535
474 </div> <!-- /apiPage --> 536 </div> <!-- /apiPage -->
475 </div> <!-- /mainColumn --> 537 </div> <!-- /gc-pagecontent -->
476 </div> <!-- /pageContent --> 538 </div> <!-- /g-section -->
477 <div id="pageFooter" --=""> 539 </div> <!-- /codesiteContent -->
540 <div id="gc-footer" --="">
541 <div class="text">
478 <p> 542 <p>
479 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>, 543 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>,
480 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons 544 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons
481 Attribution 3.0 License</a>, and code samples are licensed under the 545 Attribution 3.0 License</a>, and code samples are licensed under the
482 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>. 546 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>.
483 </p> 547 </p>
484 <p> 548 <p>
485 ©2009 Google 549 ©2009 Google
486 </p> 550 </p>
487 551
(...skipping 11 matching lines...) Expand all
499 // code.google.com site-wide tracking 563 // code.google.com site-wide tracking
500 try { 564 try {
501 _uacct="UA-18071-1"; 565 _uacct="UA-18071-1";
502 _uanchor=1; 566 _uanchor=1;
503 _uff=0; 567 _uff=0;
504 urchinTracker(); 568 urchinTracker();
505 } 569 }
506 catch(e) {/* urchinTracker not available. */} 570 catch(e) {/* urchinTracker not available. */}
507 </script> 571 </script>
508 <!-- end analytics --> 572 <!-- end analytics -->
509 573 </div>
510 </div> <!-- /pageFooter --> 574 </div> <!-- /gc-footer -->
511 </div> <!-- /container --> 575 </div> <!-- /gc-container -->
512 </body></html> 576 </body></html>
513 577
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/api_other.html ('k') | chrome/common/extensions/docs/background_pages.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698