| OLD | NEW |
| 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> |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 <li> | 212 <li> |
| 213 <a href="#apiReference">API reference: chrome.storage</a> | 213 <a href="#apiReference">API reference: chrome.storage</a> |
| 214 <ol> | 214 <ol> |
| 215 <li> | 215 <li> |
| 216 <a href="#properties">Properties</a> | 216 <a href="#properties">Properties</a> |
| 217 <ol> | 217 <ol> |
| 218 <li> | 218 <li> |
| 219 <a href="#property-sync">sync</a> | 219 <a href="#property-sync">sync</a> |
| 220 </li><li> | 220 </li><li> |
| 221 <a href="#property-local">local</a> | 221 <a href="#property-local">local</a> |
| 222 </li><li> | |
| 223 <a href="#property-managed">managed</a> | |
| 224 </li> | 222 </li> |
| 225 </ol> | 223 </ol> |
| 226 </li> | 224 </li> |
| 227 <li> | 225 <li> |
| 228 <a href="#global-events">Events</a> | 226 <a href="#global-events">Events</a> |
| 229 <ol> | 227 <ol> |
| 230 <li> | 228 <li> |
| 231 <a href="#event-onChanged">onChanged</a> | 229 <a href="#event-onChanged">onChanged</a> |
| 232 </li> | 230 </li> |
| 233 </ol> | 231 </ol> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 <ul> | 281 <ul> |
| 284 <li>User data can be automatically synced with Chrome sync | 282 <li>User data can be automatically synced with Chrome sync |
| 285 (using <code>storage.sync</code>).</li> | 283 (using <code>storage.sync</code>).</li> |
| 286 <li>Your extension's content scripts can directly access user data | 284 <li>Your extension's content scripts can directly access user data |
| 287 without the need for a background page.</li> | 285 without the need for a background page.</li> |
| 288 <li>A user's extension settings can be persisted | 286 <li>A user's extension settings can be persisted |
| 289 even when using | 287 even when using |
| 290 <a href="manifest.html#incognito">split incognito behavior</a>.</li> | 288 <a href="manifest.html#incognito">split incognito behavior</a>.</li> |
| 291 <li>User data can be stored as objects | 289 <li>User data can be stored as objects |
| 292 (the <code>localStorage API</code> stores data in strings).</li> | 290 (the <code>localStorage API</code> stores data in strings).</li> |
| 293 <li>Domain policies configured by the administrator for the extension | |
| 294 can be read (using <code>storage.managed</code>).</li> | |
| 295 </ul> | 291 </ul> |
| 296 <h2 id="manifest">Manifest</h2> | 292 <h2 id="manifest">Manifest</h2> |
| 297 <p>You must declare the "storage" permission in the <a href="manifest.html">exte
nsion manifest</a> | 293 <p>You must declare the "storage" permission in the <a href="manifest.html">exte
nsion manifest</a> |
| 298 to use the storage API. | 294 to use the storage API. |
| 299 For example:</p> | 295 For example:</p> |
| 300 <pre>{ | 296 <pre>{ |
| 301 "name": "My extension", | 297 "name": "My extension", |
| 302 ... | 298 ... |
| 303 <b>"permissions": [ | 299 <b>"permissions": [ |
| 304 "storage" | 300 "storage" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 323 Chrome syncs the data. | 319 Chrome syncs the data. |
| 324 Even if a user disables syncing, | 320 Even if a user disables syncing, |
| 325 <code>storage.sync</code> will still work. | 321 <code>storage.sync</code> will still work. |
| 326 In this case, it will behave identically | 322 In this case, it will behave identically |
| 327 to <code>storage.local</code>. | 323 to <code>storage.local</code>. |
| 328 </p> | 324 </p> |
| 329 <p class="warning"> | 325 <p class="warning"> |
| 330 Confidential user information should not be stored! | 326 Confidential user information should not be stored! |
| 331 The storage area isn't encrypted. | 327 The storage area isn't encrypted. |
| 332 </p> | 328 </p> |
| 333 <p> | |
| 334 The <code>storage.managed</code> is a read-only | |
| 335 storage that contains settings configured by the | |
| 336 domain administrator for the extension. Enforcing | |
| 337 these settings allows administrators to configure | |
| 338 your extension on enterprise deployments. | |
| 339 </p> | |
| 340 <h2 id="limits">Storage and throttling limits</h2> | 329 <h2 id="limits">Storage and throttling limits</h2> |
| 341 <p><code>chrome.storage</code> is not a big truck. | 330 <p><code>chrome.storage</code> is not a big truck. |
| 342 It's a series of tubes. | 331 It's a series of tubes. |
| 343 And if you don't understand, | 332 And if you don't understand, |
| 344 those tubes can be filled, | 333 those tubes can be filled, |
| 345 and if they are filled | 334 and if they are filled |
| 346 when you put your message in, | 335 when you put your message in, |
| 347 it gets in line, | 336 it gets in line, |
| 348 and it's going to be delayed | 337 and it's going to be delayed |
| 349 by anyone that puts into that tube | 338 by anyone that puts into that tube |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 <!-- OBJECT EVENT FIELDS --> | 586 <!-- OBJECT EVENT FIELDS --> |
| 598 <!-- FUNCTION PARAMETERS --> | 587 <!-- FUNCTION PARAMETERS --> |
| 599 </div> | 588 </div> |
| 600 </div> | 589 </div> |
| 601 </dl> | 590 </dl> |
| 602 </dd> | 591 </dd> |
| 603 <!-- OBJECT METHODS --> | 592 <!-- OBJECT METHODS --> |
| 604 <!-- OBJECT EVENT FIELDS --> | 593 <!-- OBJECT EVENT FIELDS --> |
| 605 <!-- FUNCTION PARAMETERS --> | 594 <!-- FUNCTION PARAMETERS --> |
| 606 </div> | 595 </div> |
| 607 </div><div> | |
| 608 <a name="property-managed"></a> | |
| 609 <h4>managed</h4> | |
| 610 <div class="summary"> | |
| 611 <!-- Note: intentionally longer 80 columns --> | |
| 612 <span>chrome.storage.</span><span>managed</span> | |
| 613 </div> | |
| 614 <div> | |
| 615 <dt> | |
| 616 <var>managed</var> | |
| 617 <em> | |
| 618 <!-- TYPE --> | |
| 619 <div style="display:inline"> | |
| 620 ( | |
| 621 <span id="typeTemplate"> | |
| 622 <span> | |
| 623 <a href="storage.html#type-storage.StorageArea">storage.
StorageArea</a> | |
| 624 </span> | |
| 625 </span> | |
| 626 ) | |
| 627 </div> | |
| 628 </em> | |
| 629 </dt> | |
| 630 <dd>Items under the "managed" storage area are set by the domain admin
istrator, and are read-only by the extension; trying to modify this namespace re
sults in an error.</dd> | |
| 631 <!-- OBJECT PROPERTIES --> | |
| 632 <!-- OBJECT METHODS --> | |
| 633 <!-- OBJECT EVENT FIELDS --> | |
| 634 <!-- FUNCTION PARAMETERS --> | |
| 635 </div> | |
| 636 </div> | 596 </div> |
| 637 </div> <!-- /apiGroup --> | 597 </div> <!-- /apiGroup --> |
| 638 <!-- METHODS --> | 598 <!-- METHODS --> |
| 639 <!-- /apiGroup --> | 599 <!-- /apiGroup --> |
| 640 <!-- EVENTS --> | 600 <!-- EVENTS --> |
| 641 <div id="eventsTemplate" class="apiGroup"> | 601 <div id="eventsTemplate" class="apiGroup"> |
| 642 <a name="global-events"></a> | 602 <a name="global-events"></a> |
| 643 <h3>Events</h3> | 603 <h3>Events</h3> |
| 644 <!-- iterates over all events --> | 604 <!-- iterates over all events --> |
| 645 <div class="apiItem"> | 605 <div class="apiItem"> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 ( | 648 ( |
| 689 <span id="typeTemplate"> | 649 <span id="typeTemplate"> |
| 690 <span> | 650 <span> |
| 691 <span>string</span> | 651 <span>string</span> |
| 692 </span> | 652 </span> |
| 693 </span> | 653 </span> |
| 694 ) | 654 ) |
| 695 </div> | 655 </div> |
| 696 </em> | 656 </em> |
| 697 </dt> | 657 </dt> |
| 698 <dd>The name of the storage area ("sync", "local" or "managed") the ch
anges are for.</dd> | 658 <dd>The name of the storage area ("sync" or "local") the changes are f
or.</dd> |
| 699 <!-- OBJECT PROPERTIES --> | 659 <!-- OBJECT PROPERTIES --> |
| 700 <!-- OBJECT METHODS --> | 660 <!-- OBJECT METHODS --> |
| 701 <!-- OBJECT EVENT FIELDS --> | 661 <!-- OBJECT EVENT FIELDS --> |
| 702 <!-- FUNCTION PARAMETERS --> | 662 <!-- FUNCTION PARAMETERS --> |
| 703 </div> | 663 </div> |
| 704 </div> | 664 </div> |
| 705 </dl> | 665 </dl> |
| 706 </div> | 666 </div> |
| 707 <!-- EXTRA PARAMETERS --> | 667 <!-- EXTRA PARAMETERS --> |
| 708 <!-- LISTENER RETURN VALUE --> | 668 <!-- LISTENER RETURN VALUE --> |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 _uff=0; | 1252 _uff=0; |
| 1293 urchinTracker(); | 1253 urchinTracker(); |
| 1294 } | 1254 } |
| 1295 catch(e) {/* urchinTracker not available. */} | 1255 catch(e) {/* urchinTracker not available. */} |
| 1296 </script> | 1256 </script> |
| 1297 <!-- end analytics --> | 1257 <!-- end analytics --> |
| 1298 </div> | 1258 </div> |
| 1299 </div> <!-- /gc-footer --> | 1259 </div> <!-- /gc-footer --> |
| 1300 </div> <!-- /gc-container --> | 1260 </div> <!-- /gc-container --> |
| 1301 </body></html> | 1261 </body></html> |
| OLD | NEW |