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

Side by Side Diff: chrome/common/extensions/docs/templates/intros/webRequest.html

Issue 12223068: Fix some typos, broken links and other issues in extension docs (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 <p id="classSummary"> 1 <p id="classSummary">
2 Use the <code>chrome.webRequest</code> module to intercept, block, 2 Use the <code>chrome.webRequest</code> module to intercept, block,
3 or modify requests in-flight and to observe and analyze traffic. 3 or modify requests in-flight and to observe and analyze traffic.
4 </p> 4 </p>
5 5
6 <h2 id="manifest">Manifest</h2> 6 <h2 id="manifest">Manifest</h2>
7 <p>You must declare the "webRequest" permission in the <a 7 <p>You must declare the "webRequest" permission in the <a
8 href="manifest.html">extension manifest</a> to use the web request 8 href="manifest.html">extension manifest</a> to use the web request
9 API, along with <a href="manifest.html#permissions">host permissions</a> 9 API, along with <a href="declare_permissions.html">host permissions</a>
10 for any hosts whose network requests you want to access. If you want to 10 for any hosts whose network requests you want to access. If you want to
11 use the web request API in a blocking fashion, you need to request 11 use the web request API in a blocking fashion, you need to request
12 the "webRequestBlocking" permission in addition. 12 the "webRequestBlocking" permission in addition.
13 For example:</p> 13 For example:</p>
14 <pre>{ 14 <pre>{
15 "name": "My extension", 15 "name": "My extension",
16 ... 16 ...
17 <b>"permissions": [ 17 <b>"permissions": [
18 "webRequest", 18 "webRequest",
19 "*://*.google.com" 19 "*://*.google.com"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 <li>Pragma</li> 112 <li>Pragma</li>
113 <li>Proxy-Authorization</li> 113 <li>Proxy-Authorization</li>
114 <li>Proxy-Connection</li> 114 <li>Proxy-Connection</li>
115 <li>Transfer-Encoding</li> 115 <li>Transfer-Encoding</li>
116 </ul> 116 </ul>
117 </p> 117 </p>
118 118
119 <p> 119 <p>
120 The webRequest API only exposes requests that the extension has 120 The webRequest API only exposes requests that the extension has
121 permission to see, given its 121 permission to see, given its
122 <a href="manifest.html#permissions">host permissions</a>. 122 <a href="declare_permissions.html">host permissions</a>.
123 Moreover, only the following schemes are accessible: 123 Moreover, only the following schemes are accessible:
124 <code>http://</code>, 124 <code>http://</code>,
125 <code>https://</code>, 125 <code>https://</code>,
126 <code>ftp://</code>, 126 <code>ftp://</code>,
127 <code>file://</code>, or 127 <code>file://</code>, or
128 <code>chrome-extension://</code>. 128 <code>chrome-extension://</code>.
129 In addition, even certain requests with URLs using one of the above schemes 129 In addition, even certain requests with URLs using one of the above schemes
130 are hidden, e.g., 130 are hidden, e.g.,
131 <code>chrome-extension://other_extension_id</code> where 131 <code>chrome-extension://other_extension_id</code> where
132 <code>other_extension_id</code> is not the ID of the extension to handle 132 <code>other_extension_id</code> is not the ID of the extension to handle
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 } 291 }
292 return {requestHeaders: details.requestHeaders}; 292 return {requestHeaders: details.requestHeaders};
293 }, 293 },
294 {urls: ["&lt;all_urls&gt;"]}, 294 {urls: ["&lt;all_urls&gt;"]},
295 ["blocking", "requestHeaders"]); 295 ["blocking", "requestHeaders"]);
296 </pre> 296 </pre>
297 297
298 <p> For more example code, see the <a href="samples.html#webrequest">web request 298 <p> For more example code, see the <a href="samples.html#webrequest">web request
299 samples</a>.</p> 299 samples</a>.</p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698