| OLD | NEW |
| 1 <table class="intro"> | |
| 2 <tr> | |
| 3 <th scope="col"></th> | |
| 4 <th scope="col"></th> | |
| 5 </tr> | |
| 6 <tr> | |
| 7 <td><strong>Description:</strong></td> | |
| 8 <td>Use the <code>chrome.storage</code> module | |
| 9 to store, retrieve, and track changes to user data.</td> | |
| 10 </tr> | |
| 11 <tr> | |
| 12 <td><strong>Availability:</strong></td> | |
| 13 <td>Google Chrome 20</td> | |
| 14 </tr> | |
| 15 <tr> | |
| 16 <td><strong>Permissions:</strong></td> | |
| 17 <td><code>"storage"</code></td> | |
| 18 </tr> | |
| 19 <tr> | |
| 20 <td><strong>Learn more:</strong></td> | |
| 21 <td><a href="https://developers.google.com/live/shows/7320022/">Chrome Apps
Office Hours: Chrome Storage APIs</a><br> | |
| 22 <a href="https://developers.google.com/live/shows/7320022-1/">Chrome Apps Of
fice Hours: Storage API Deep Dive</a></td> | |
| 23 </tr> | |
| 24 </table> | |
| 25 | |
| 26 <h2 id="overview">Overview</h2> | 1 <h2 id="overview">Overview</h2> |
| 27 | 2 |
| 28 <p id="classSummary"> | 3 <p> |
| 29 This API has been optimized | 4 This API has been optimized |
| 30 to meet the specific storage needs of extensions. | 5 to meet the specific storage needs of extensions. |
| 31 It provides the same storage capabilities as the | 6 It provides the same storage capabilities as the |
| 32 <a href="https://developer.mozilla.org/en/DOM/Storage#localStorage">localStorage
API</a> | 7 <a href="https://developer.mozilla.org/en/DOM/Storage#localStorage">localStorage
API</a> |
| 33 with the following key differences: | 8 with the following key differences: |
| 34 </p> | 9 </p> |
| 35 | 10 |
| 36 <ul> | 11 <ul> |
| 37 <li>User data can be automatically synced with Chrome sync | 12 <li>User data can be automatically synced with Chrome sync |
| 38 (using <code>storage.sync</code>).</li> | 13 (using <code>storage.sync</code>).</li> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 var storageChange = changes[key]; | 128 var storageChange = changes[key]; |
| 154 console.log('Storage key "%s" in namespace "%s" changed. ' + | 129 console.log('Storage key "%s" in namespace "%s" changed. ' + |
| 155 'Old value was "%s", new value is "%s".', | 130 'Old value was "%s", new value is "%s".', |
| 156 key, | 131 key, |
| 157 namespace, | 132 namespace, |
| 158 storageChange.oldValue, | 133 storageChange.oldValue, |
| 159 storageChange.newValue); | 134 storageChange.newValue); |
| 160 } | 135 } |
| 161 }); | 136 }); |
| 162 </pre> | 137 </pre> |
| OLD | NEW |