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

Unified Diff: chrome/common/extensions/docs/static/match_patterns.html

Issue 2864035: Fix up extension docs to include latest changes to how file URLs work with (Closed)
Patch Set: spelling Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/match_patterns.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/static/match_patterns.html
diff --git a/chrome/common/extensions/docs/static/match_patterns.html b/chrome/common/extensions/docs/static/match_patterns.html
index e30c828bc8f16e0e18758ffbb2f8fbe8ac01fbec..ab8d7fb00cf307cc8d22b1f4e89d7787e9e8eb7e 100644
--- a/chrome/common/extensions/docs/static/match_patterns.html
+++ b/chrome/common/extensions/docs/static/match_patterns.html
@@ -13,15 +13,19 @@ which URLs your content script affects.
<p>
A match pattern is essentially a URL
-that begins with <code>http</code>, <code>https</code>,
-<code>file</code>, or <code>ftp</code>,
+that begins with a permitted scheme (<code>http</code>,
+<code>https</code>, <code>file</code>, or <code>ftp</code>),
and that can contain '<code>*</code>' characters.
+The special pattern
+<code>&lt;all_urls&gt;</code> matches any URL
+that starts with a permitted scheme.
Each match pattern has 3 parts:</p>
</p>
<ul>
<li> <em>scheme</em> &mdash;
for example, <code>http</code> or <code>file</code>
+ or <code>*</code>
</li>
<li> <em>host</em> &mdash;
for example, <code>www.google.com</code>
@@ -38,11 +42,18 @@ Each match pattern has 3 parts:</p>
<p>Here's the basic syntax:</p>
-<pre><em>&lt;url-pattern&gt;</em> := <em>&lt;scheme&gt;</em>://<em>&lt;host&gt;</em><em>&lt;path&gt;</em><br><em>&lt;scheme&gt;</em> := 'http' | 'https' | 'file' | 'ftp'<br><em>&lt;host&gt;</em> := '*' | '*.' <em>&lt;any char except '/' and '*'&gt;</em>+<br><em>&lt;path&gt;</em> := '/' <em>&lt;any chars&gt;</em></pre>
+<pre>
+<em>&lt;url-pattern&gt;</em> := <em>&lt;scheme&gt;</em>://<em>&lt;host&gt;</em><em>&lt;path&gt;</em>
+<em>&lt;scheme&gt;</em> := '*' | 'http' | 'https' | 'file' | 'ftp'
+<em>&lt;host&gt;</em> := '*' | '*.' <em>&lt;any char except '/' and '*'&gt;</em>+
+<em>&lt;path&gt;</em> := '/' <em>&lt;any chars&gt;</em>
+</pre>
<p>
The meaning of '<code>*</code>' depends on whether
-it's in the <em>host</em> or the <em>path</em> part.
+it's in the <em>scheme</em>, <em>host</em>, or <em>path</em> part.
+If the <em>scheme</em> is <code>*</code>,
+then it matches either <code>http</code> or <code>https</code>.
If the <em>host</em> is just <code>*</code>,
then it matches any host.
If the <em>host</em> is <code>*.<em>hostname</em></code>,
@@ -147,6 +158,39 @@ The following table shows some valid patterns.
http://127.0.0.1/foo/bar.html
</td>
</tr>
+
+<tr>
+ <td>
+ <code>*://mail.google.com/* </code>
+ </td>
+
+ <td>
+ Matches any URL that starts with
+ <code>http://mail.google.com</code> or
+ <code>https://mail.google.com</code>.
+ </td>
+
+ <td>
+ http://mail.google.com/foo/baz/bar<br>
+ https://mail.google.com/foobar
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <code>&lt;all_urls&gt;</code>
+ </td>
+
+ <td>
+ Matches any URL that uses a permitted scheme.
+ (See the beginning of this section for the list of permitted
+ schemes.)
+ </td>
+ <td>
+ http://example.org/foo/bar.html<br>
+ file:///bar/baz.html
+ </td>
+</tr>
</tbody>
</table>
« no previous file with comments | « chrome/common/extensions/docs/match_patterns.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698