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

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

Issue 10832042: Extensions Docs Server: Doc conversion script (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment in converter.py Created 8 years, 4 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 <!-- BEGIN AUTHORED CONTENT -->
2 <p id="classSummary"> 1 <p id="classSummary">
3 Use the <code>chrome.permissions</code> module to implement 2 Use the <code>chrome.permissions</code> module to implement
4 optional permissions. You can request optional permissions during your 3 optional permissions. You can request optional permissions during your
5 extension's regular application flow rather than at install time, so users 4 extension's regular application flow rather than at install time, so users
6 understand why the permissions are needed and use only those that are 5 understand why the permissions are needed and use only those that are
7 necessary. 6 necessary.
8 </p> 7 </p>
9 <p> 8 <p>
10 For general information about permissions and details about each permission, 9 For general information about permissions and details about each permission,
11 see the <a href="manifest.html#permissions">permissions</a> section of the 10 see the <a href="manifest.html#permissions">permissions</a> section of the
12 manifest documentation. 11 manifest documentation.
13 </p> 12 </p>
14 <h2 id="howto"> Implementing optional permissions </h2> 13 <h2 id="howto"> Implementing optional permissions </h2>
15 14 <h3 id="types">
16 <h3 id="types"> Step 1: Decide which permissions are optional and required </h3> 15 Step 1: Decide which permissions are optional and required
16 </h3>
17 <p> 17 <p>
18 Extensions should generally require permissions when they are needed for the 18 Extensions should generally require permissions when they are needed for the
19 extension's basic functionality and employ optional permissions for optional 19 extension's basic functionality and employ optional permissions for optional
20 features. 20 features.
21 </p> 21 </p>
22 <p> 22 <p>
23 Advantages of optional permissions: 23 Advantages of optional permissions:
24 <ul> 24 <ul>
25 <li> 25 <li>
26 Users run with less permissions since they enable only what is needed. 26 Users run with less permissions since they enable only what is needed.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 permissions: ['tabs'], 151 permissions: ['tabs'],
152 origins: ['http://www.google.com/'] 152 origins: ['http://www.google.com/']
153 }, function(removed) { 153 }, function(removed) {
154 if (removed) { 154 if (removed) {
155 // The permissions have been removed. 155 // The permissions have been removed.
156 } else { 156 } else {
157 // The permissions have not been removed (e.g., you tried to remove 157 // The permissions have not been removed (e.g., you tried to remove
158 // required permissions). 158 // required permissions).
159 } 159 }
160 }); 160 });
161 </pre> 161 </pre>
162 <!-- END AUTHORED CONTENT -->
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698