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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/autoupdate.html
===================================================================
--- chrome/common/extensions/docs/autoupdate.html (revision 32042)
+++ chrome/common/extensions/docs/autoupdate.html (working copy)
@@ -15,7 +15,7 @@
</script>
<script type="text/javascript" src="js/api_page_generator.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
- <title>Autoupdating</title></head><body> <div id="container">
+ <title>Autoupdating</title></head><body> <div id="gc-container" class="labs">
<!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
<!-- In particular, sub-templates that recurse, must be used by allowing
jstemplate to make a copy of the template in this section which
@@ -68,39 +68,74 @@
</div> <!-- /SUBTEMPLATES -->
- <a name="top"> </a>
+ <a id="top"></a>
+ <div id="skipto">
+ <a href="#gc-pagecontent">Skip to page content</a>
+ <a href="#gc-toc">Skip to main navigation</a>
+ </div>
<!-- API HEADER -->
- <div id="pageHeader">
- <div id="searchbox">
- <form action="http://www.google.com/cse" id="cse-search-box">
- <div>
+ <div id="gc-header">
+ <div id="logo">
+
+
+ <img src="images/code_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:0;">
+
+
+ </div>
+ <div id="search">
+ <div id="searchForm" class="searchForm">
+ <form action="http://www.google.com/cse" id="cse">
+ <div id="gsc-search-box">
<input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" size="31">
- <input type="submit" name="sa" value="Search">
+ <input class="gsc-search-button" type="submit" name="sa" value="Search">
</div>
</form>
+ <p>&nbsp;</p>
+ </div> <!-- end searchForm -->
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
- <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&amp;t13n_langs=en"></script>
- <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
- </div>
- <div id="pageTitle">
- <h1>Autoupdating</h1>
- </div>
- </div> <!-- /pageHeader -->
+ <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse&amp;t13n_langs=en"></script>
+ <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse&amp;lang=en"></script>
+ </div> <!-- end search -->
+ </div> <!-- end gc-header -->
- <div id="pageContent">
+ <div id="codesiteContent">
+
+ <a id="gc-topnav-anchor"></a>
+ <div id="gc-topnav">
+ <h1>Google Chrome Extensions (<a href="/labs/">Labs</a>)</h1>
+ <ul id="home" class="gc-topnav-tabs">
+ <li id="home_link">
+ <a href="index.html" class="selected" title="Google Chrome Extensions documentation home page">Home</a>
+ </li>
+ <li id="blog_link">
+ <a href="http://blog.chromium.org/" title="Chromium blog">Blog</a>
+ </li>
+ <li id="faq_link">
+ <a href="faq.html" title="Google Chrome Extensions FAQ">FAQ</a>
+ </li>
+ <li id="group_link">
+ <a href="http://groups.google.com/group/chromium-extensions" title="Chromium-Extensions group">Group</a>
+ </li>
+ <li id="terms_link">
+ Terms
+ </li>
+ </ul>
+ </div> <!-- end gc-topnav -->
+
+ <div class="g-section g-tpl-170">
<!-- SIDENAV -->
- <div id="leftNav">
+ <div class="g-unit g-first" id="gc-toc">
<ul>
- <li> <a href="index.html">Home</a></li>
- <li> <a href="getstarted.html">Getting Started</a></li>
- <li> <a href="overview.html">Overview</a></li>
- <li> <a href="devguide.html"><div>Developer's Guide</div></a>
+ <li><a href="index.html">Home</a></li>
+ <li><a href="getstarted.html">Getting Started</a></li>
+ <li><a href="overview.html">Overview</a></li>
+ <li><h2><a href="devguide.html">Developer's Guide</a></h2>
<ul>
- <li> Browser UI
+ <li>Browser UI
<ul>
<li><a href="browserAction.html">Browser Actions</a></li>
<li><a href="options.html">Options Pages</a></li>
@@ -109,7 +144,7 @@
<li><a href="themes.html">Themes</a></li>
</ul>
</li>
- <li> Browser Interaction
+ <li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
@@ -117,7 +152,7 @@
<li><a href="windows.html">Windows</a></li>
</ul>
</li>
- <li> Implementation
+ <li>Implementation
<ul>
<li><a href="background_pages.html">Background Pages</a></li>
<li><a href="content_scripts.html">Content Scripts</a></li>
@@ -126,7 +161,7 @@
<li><a href="npapi.html">NPAPI Plugins</a></li>
</ul>
</li>
- <li> Finishing
+ <li>Finishing
<ul>
<li class="leftNavSelected">Autoupdating</li>
<li><a href="packaging.html">Packaging</a></li>
@@ -134,55 +169,78 @@
</li>
</ul>
</li>
- <li><a href="tutorials.html"><div>Tutorials</div></a>
+ <li><h2><a href="tutorials.html">Tutorials</a></h2>
<ul>
<li><a href="tut_debugging.html">Debugging</a></li>
</ul>
</li>
- <li>Reference
+ <li><h2>Reference</h2>
<ul>
- <li> Formats
+ <li>Formats
<ul>
<li><a href="manifest.html">Manifest Files</a></li>
<li><a href="match_patterns.html">Match Patterns</a></li>
<!-- <li>Packages (.crx)</li> -->
</ul>
</li>
- <li> <a href="api_index.html">chrome.* APIs</a> </li>
- <li> <a href="api_other.html">Other APIs</a> </li>
+ <li><a href="api_index.html">chrome.* APIs</a></li>
+ <li><a href="api_other.html">Other APIs</a></li>
</ul>
</li>
- <li><a href="samples.html">Samples</a></li>
+ <li><h2><a href="samples.html">Samples</a></h2></li>
</ul>
</div>
- <div id="mainColumn">
+ <div class="g-unit" id="gc-pagecontent">
+ <div id="pageTitle">
+ <h1 class="page_title">Autoupdating</h1>
+ </div>
<!-- TABLE OF CONTENTS -->
<div id="toc">
- <p>Contents</p>
+ <h2>Contents</h2>
<ol>
<li>
- <a href="#H2-0">Introduction</a>
+ <a href="#H2-0">Overview</a>
<ol>
<li style="display: none; ">
<a>h3Name</a>
</li>
</ol>
</li><li>
- <a href="#H2-1">Overview</a>
+ <a href="#H2-1">Update URL</a>
<ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#H2-2">Update manifest</a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#H2-3">Testing</a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#H2-4">Advanced usage: request parameters</a>
+ <ol>
<li>
- <a href="#H3-2">Update URL</a>
- </li><li>
- <a href="#H3-3">Update Manifest</a>
- </li><li>
- <a href="#H3-4">Testing</a>
- </li><li>
- <a href="#H3-5">Advanced Usage : Request Parameters</a>
- </li><li>
- <a href="#H3-6">Advanced Usage : Minimum Browser Version</a>
+ <a href="#H3-5">Future work</a>
</li>
</ol>
+ </li><li>
+ <a href="#H2-6">Advanced usage: minimum browser version</a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
</li>
<div style="display: none; ">
<li>
@@ -230,22 +288,22 @@
<!-- STATIC CONTENT PLACEHOLDER -->
<div id="static"><div id="pageData-title" class="pageData">Autoupdating</div>
<div id="pageData-showTOC" class="pageData">true</div>
-<a name="H2-0"></a><h2>Introduction</h2>
-<p>We want extensions to be autoupdated for some of the same reasons as chrome itself: to incorporate bug and security fixes, add new features or performance enhancements, and improve user interfaces.</p>
-<p>For extensions packaged and distributed via the extensions gallery, developers will be able to use a web interface to release updated versions of their extensions and do not need to concern themselves with the rest of this document.</p>
+<p>We want extensions to be autoupdated for some of the same reasons as Google Chrome itself: to incorporate bug and security fixes, add new features or performance enhancements, and improve user interfaces.</p>
+<p>For extensions packaged and distributed via the gallery, developers will be able to use a web interface to release updated versions of their extensions and do not need to concern themselves with the rest of this document.</p>
+
<p>Those who choose to host extensions themselves instead of using the gallery will 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">Packaging</a> first.</p>
-<a name="H2-1"></a><h2>Overview</h2>
+<a name="H2-0"></a><h2>Overview</h2>
<ul><li>An extension manifest may contain an "update_url" for doing update checks.</li>
-<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>
+<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>
-<p>Every few hours, the browser will check if any installed extensions have an autoupdate url. For each one, it will make a request to that url looking for an update manifest xml file. If the update manifest mentions a version of an extension that is more recent than what's installed, it will download and install the new version. Similar to manual updates, the new crx must be signed with the same private key as the currently installed version.</p>
+<p>Every few hours, the browser will check if any installed extensions have an autoupdate URL. For each one, it will make a request to that URL looking for an update manifest XML file. If the update manifest mentions a version of an extension that is more recent than what's installed, it will download and install the new version. Similar to manual updates, the new crx must be signed with the same private key as the currently installed version.</p>
-<a name="H3-2"></a><h3>Update URL</h3>
+<a name="H2-1"></a><h2>Update URL</h2>
<p>For those who are hosting their own extensions, you need to add the "update_url" key to your <a href="manifest.html">manifest.json</a> file like this:</p>
<pre>{
...
@@ -254,8 +312,8 @@
}
</pre>
-<a name="H3-3"></a><h3>Update Manifest</h3>
-<p>The "update manifest" returned by the server&nbsp;should be an xml document that looks like this (parts you'll want to modify highlighted):</p>
+<a name="H2-2"></a><h2>Update manifest</h2>
+<p>The "update manifest" returned by the server&nbsp;should be an XML document that looks like this (parts you'll want to modify highlighted):</p>
<pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'&gt;
@@ -265,34 +323,38 @@
&lt;/gupdate&gt;
</pre>
-<p>(This xml format is borrowed from that used by Omaha, Google's update infrastructure. See <a href="http://code.google.com/p/omaha/">http://code.google.com/p/omaha/</a> for more details.)</p>
+<p>(This XML format is borrowed from that used by Omaha, Google's update infrastructure. See <a href="http://code.google.com/p/omaha/">http://code.google.com/p/omaha/</a> for more details.)</p>
<p><b>appid</b><br>
-The 'appid' property is the extension id, generated based on a hash of the extension's public key as described in <a href="packaging.html">Packaging</a>. You can find out the id of your extension by going to chrome://extensions/ in a chrome browser where you have the extension installed.</p>
+The 'appid' property is the extension id, generated based on a hash of the extension's public key as described in <a href="packaging.html">Packaging</a>. You can find out the id of your extension by going to <b>chrome://extensions</b>.</p>
<p><b>codebase</b><br>
-The 'codebase' property is a url to the crx file.</p>
+The 'codebase' property is a URL to the crx file.</p>
<p><b>version</b><br>
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>
-<p>The update manifest xml file may contain information about multiple extensions by including multiple <code>&lt;app&gt;</code> tags.</p>
+<p>The update manifest XML file may contain information about multiple extensions by including multiple <code>&lt;app&gt;</code> tags.</p>
-<a name="H3-4"></a><h3>Testing</h3>
-<p>The default update check frequency is several hours, which obviously makes testing challenging. To overcome this, you can 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 chrome like this:</p>
+<a name="H2-3"></a><h2>Testing</h2>
+<p>The default update check frequency is several hours,
+but you can force an update using the Extensions page's
+<b>Update extensions now</b> button.
+</p>
+
+<p>
+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>
<pre>chrome.exe <b>--extensions-update-frequency=45</b></pre>
-<p>Note that this affects checks for all installed extensions, so consider the bandwidth and server load implications of this. You may want to temporarily uninstall all but the one extension you are testing with, and should not run with this 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 following issue to receive updates: <a href="http://crbug.com/17853" rel="nofollow">http://crbug.com/17853</a>.</p>
+<p>Note that this affects checks for all installed extensions, so consider the bandwidth and server load implications of this. You may want to temporarily uninstall all but the one extension you are testing with, and should not run with this option turned on during normal browser usage.</p>
-<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>
-
-<a name="H3-5"></a><h3>Advanced Usage : Request Parameters</h3>
-<p>The basic autoupdate mechanism is designed to make the server-side work as easy as just dropping a static xml file onto any plain webserver such as apache, and updating that xml file as you release new versions of your extension(s).</p>
-<p>More advanced developers may wish to take advantage of the fact that we add on 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>
+<a name="H2-4"></a><h2>Advanced usage: request parameters</h2>
+<p>The basic autoupdate mechanism is designed to make the server-side work as easy as just dropping a static XML file onto any plain webserver such as apache, and updating that XML file as you release new versions of your extension(s).</p>
+<p>More advanced developers may wish to take advantage of the fact that we add on 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>
<p>The format of the request parameters is:</p>
<p><code>&nbsp;&nbsp;?x=&lt;extension_data&gt;</code></p>
-<p>where <code>&lt;extension_data&gt;</code> is an url-encoded string of the format:</p>
+<p>where <code>&lt;extension_data&gt;</code> is an URL-encoded string of the format:</p>
<p><code>&nbsp;&nbsp;id=&lt;id&gt;&amp;v=&lt;version&gt;</code></p>
<p>So for example, say we have two extensions installed</p>
@@ -308,15 +370,15 @@
<p><b>Note</b>: in releases before 3.0.196.x there was a bug in how request parameters were put together (<a href="http://crbug.com/17469" rel="nofollow">http://crbug.com/17469</a>).</p>
-<h4>Future work for Request Parameters</h4>
+<a name="H3-5"></a><h3>Future work</h3>
<p>While not implemented yet, we will eventually list multiple extensions in a single request for each unique update_url. For the above example, the request would end up being:</p>
<p><code>http://test.com/extension_updates.php?x=id%3Daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%26v%3D1.1&amp;x=id%3Dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb%26v%3D0.4</code></p>
-<p>If the number of installed extensions using the same update_url is large enough that a GET request url would be too long (probably greater than 1024 characters or so), the update check will instead issue a POST with the request parameters in the POST body.</p>
+<p>If the number of installed extensions using the same update_url is large enough that a GET request URL would be too long (probably greater than 1024 characters or so), the update check will instead issue a POST with the request parameters in the POST body.</p>
-<a name="H3-6"></a><h3>Advanced Usage : Minimum Browser Version</h3>
-<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 versions 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 the <code>&lt;app&gt;</code> tag in your update manifest. For example:</p>
+<a name="H2-6"></a><h2>Advanced usage: minimum browser version</h2>
+<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 versions 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 versions at or higher than a specific version, you would add the prodversionmin parameter to the <code>&lt;app&gt;</code> tag in your update manifest. For example:</p>
<pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'&gt;
@@ -326,7 +388,7 @@
&lt;/gupdate&gt;
</pre>
-<p>This would ensure that users of this extension would only autoupdate to version 2 if they are running chrome 3.0.193.0 or greater.</p>
+<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>
</div>
@@ -472,9 +534,11 @@
</div> <!-- /apiGroup -->
</div> <!-- /apiPage -->
- </div> <!-- /mainColumn -->
- </div> <!-- /pageContent -->
- <div id="pageFooter" --="">
+ </div> <!-- /gc-pagecontent -->
+ </div> <!-- /g-section -->
+ </div> <!-- /codesiteContent -->
+ <div id="gc-footer" --="">
+ <div class="text">
<p>
Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>,
the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons
@@ -506,8 +570,8 @@
catch(e) {/* urchinTracker not available. */}
</script>
<!-- end analytics -->
-
- </div> <!-- /pageFooter -->
- </div> <!-- /container -->
+ </div>
+ </div> <!-- /gc-footer -->
+ </div> <!-- /gc-container -->
</body></html>
« 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