| 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> |
| 27 |
| 1 <p id="classSummary"> | 28 <p id="classSummary"> |
| 2 Use the <code>chrome.storage</code> module | |
| 3 to store, retrieve, and track changes to user data. | |
| 4 This API has been optimized | 29 This API has been optimized |
| 5 to meet the specific storage needs of extensions. | 30 to meet the specific storage needs of extensions. |
| 6 It provides the same storage capabilities as the | 31 It provides the same storage capabilities as the |
| 7 <a href="https://developer.mozilla.org/en/DOM/Storage#localStorage">localStorage
API</a> | 32 <a href="https://developer.mozilla.org/en/DOM/Storage#localStorage">localStorage
API</a> |
| 8 with the following key differences: | 33 with the following key differences: |
| 9 </p> | 34 </p> |
| 10 | 35 |
| 11 <ul> | 36 <ul> |
| 12 <li>User data can be automatically synced with Chrome sync | 37 <li>User data can be automatically synced with Chrome sync |
| 13 (using <code>storage.sync</code>).</li> | 38 (using <code>storage.sync</code>).</li> |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 storageChange.oldValue, | 157 storageChange.oldValue, |
| 133 storageChange.newValue); | 158 storageChange.newValue); |
| 134 } | 159 } |
| 135 }); | 160 }); |
| 136 </pre> | 161 </pre> |
| 137 | 162 |
| 138 <p> | 163 <p> |
| 139 You can find examples that use this API on the | 164 You can find examples that use this API on the |
| 140 <a href="samples.html#sty">Samples page</a>. | 165 <a href="samples.html#sty">Samples page</a>. |
| 141 </p> | 166 </p> |
| OLD | NEW |