| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Enumeration for device state about remaining space. | 6 * Enumeration for device state about remaining space. |
| 7 * These values must be kept in sync with | 7 * These values must be kept in sync with |
| 8 * StorageManagerHandler::StorageSpaceState in C++ code. | 8 * StorageManagerHandler::StorageSpaceState in C++ code. |
| 9 * @enum {number} | 9 * @enum {number} |
| 10 * @const | 10 * @const |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 $('storage-manager-size-downloads').textContent = size; | 124 $('storage-manager-size-downloads').textContent = size; |
| 125 }, | 125 }, |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * Updates the size of Google Drive offline files. | 128 * Updates the size of Google Drive offline files. |
| 129 * @param {string} size Formatted string of the size of Google Drive offline | 129 * @param {string} size Formatted string of the size of Google Drive offline |
| 130 * files. | 130 * files. |
| 131 * @private | 131 * @private |
| 132 */ | 132 */ |
| 133 setDriveCacheSize_: function(size) { | 133 setDriveCacheSize_: function(size) { |
| 134 assert(!$('storage-manager-item-drive-cache').hidden); |
| 134 $('storage-manager-size-drive-cache').textContent = size; | 135 $('storage-manager-size-drive-cache').textContent = size; |
| 135 }, | 136 }, |
| 136 | 137 |
| 137 /** | 138 /** |
| 138 * Updates the size of browsing data. | 139 * Updates the size of browsing data. |
| 139 * @param {string} size Formatted string of the size of browsing data. | 140 * @param {string} size Formatted string of the size of browsing data. |
| 140 * @private | 141 * @private |
| 141 */ | 142 */ |
| 142 setBrowsingDataSize_: function(size) { | 143 setBrowsingDataSize_: function(size) { |
| 143 $('storage-manager-size-browsing-data').textContent = size; | 144 $('storage-manager-size-browsing-data').textContent = size; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 157 * @param {string} size Formatted string of the size of Android apps and | 158 * @param {string} size Formatted string of the size of Android apps and |
| 158 * cache. | 159 * cache. |
| 159 * @private | 160 * @private |
| 160 */ | 161 */ |
| 161 setArcSize_: function(size) { | 162 setArcSize_: function(size) { |
| 162 assert(!$('storage-manager-item-arc').hidden); | 163 assert(!$('storage-manager-item-arc').hidden); |
| 163 $('storage-manager-size-arc').textContent = size; | 164 $('storage-manager-size-arc').textContent = size; |
| 164 }, | 165 }, |
| 165 | 166 |
| 166 /** | 167 /** |
| 168 * Shows the item "Offline files" on the overlay UI. |
| 169 * @private |
| 170 */ |
| 171 showDriveCacheItem_: function() { |
| 172 $('storage-manager-item-drive-cache').hidden = false; |
| 173 }, |
| 174 |
| 175 /** |
| 167 * Shows the item "Android apps and cache" on the overlay UI. | 176 * Shows the item "Android apps and cache" on the overlay UI. |
| 168 * @private | 177 * @private |
| 169 */ | 178 */ |
| 170 showArcItem_: function() { | 179 showArcItem_: function() { |
| 171 $('storage-manager-item-arc').hidden = false; | 180 $('storage-manager-item-arc').hidden = false; |
| 172 }, | 181 }, |
| 173 | 182 |
| 174 /** | 183 /** |
| 175 * Starts periodical update for storage usage. | 184 * Starts periodical update for storage usage. |
| 176 * @private | 185 * @private |
| (...skipping 21 matching lines...) Expand all Loading... |
| 198 | 207 |
| 199 // Forward public APIs to private implementations. | 208 // Forward public APIs to private implementations. |
| 200 cr.makePublic(StorageManager, [ | 209 cr.makePublic(StorageManager, [ |
| 201 'setArcSize', | 210 'setArcSize', |
| 202 'setBrowsingDataSize', | 211 'setBrowsingDataSize', |
| 203 'setDownloadsSize', | 212 'setDownloadsSize', |
| 204 'setDriveCacheSize', | 213 'setDriveCacheSize', |
| 205 'setOtherUsersSize', | 214 'setOtherUsersSize', |
| 206 'setSizeStat', | 215 'setSizeStat', |
| 207 'showArcItem', | 216 'showArcItem', |
| 217 'showDriveCacheItem', |
| 208 ]); | 218 ]); |
| 209 | 219 |
| 210 return { | 220 return { |
| 211 StorageManager: StorageManager | 221 StorageManager: StorageManager |
| 212 }; | 222 }; |
| 213 }); | 223 }); |
| OLD | NEW |