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

Side by Side Diff: chrome/browser/resources/options/chromeos/storage_manager.js

Issue 2111043003: Storage manager: Show the disk usage of other users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo and the order of storage items. Created 4 years, 5 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
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 * @param {string} size Formatted string of the size of Google Drive offline 103 * @param {string} size Formatted string of the size of Google Drive offline
104 * files. 104 * files.
105 * @private 105 * @private
106 */ 106 */
107 setDriveCacheSize_: function(size) { 107 setDriveCacheSize_: function(size) {
108 $('storage-manager-size-drive-cache').textContent = size; 108 $('storage-manager-size-drive-cache').textContent = size;
109 }, 109 },
110 110
111 /** 111 /**
112 * Updates the size of browsing data. 112 * Updates the size of browsing data.
113 * @param {string} size Formatted string of the size of Downloads. 113 * @param {string} size Formatted string of the size of browsing data.
114 * @private 114 * @private
115 */ 115 */
116 setBrowsingDataSize_: function(size) { 116 setBrowsingDataSize_: function(size) {
117 $('storage-manager-size-browsing-data').textContent = size; 117 $('storage-manager-size-browsing-data').textContent = size;
118 }, 118 },
119 119
120 /** 120 /**
121 * Updates the size of other users.
122 * @param {string} size Formatted string of the size of other users.
123 * @private
124 */
125 setOtherUsersSize_: function(size) {
126 $('storage-manager-size-other-users').textContent = size;
127 },
128
129 /**
121 * Updates the total size of Android apps and cache. 130 * Updates the total size of Android apps and cache.
122 * @param {string} size Formatted string of the size of Android apps and 131 * @param {string} size Formatted string of the size of Android apps and
123 * cache. 132 * cache.
124 * @private 133 * @private
125 */ 134 */
126 setArcSize_: function(size) { 135 setArcSize_: function(size) {
127 assert(!$('storage-manager-item-arc').hidden); 136 assert(!$('storage-manager-item-arc').hidden);
128 $('storage-manager-size-arc').textContent = size; 137 $('storage-manager-size-arc').textContent = size;
129 }, 138 },
130 139
131 /** 140 /**
132 * Shows the item "Android apps and cache" on the overlay UI. 141 * Shows the item "Android apps and cache" on the overlay UI.
133 * @private 142 * @private
134 */ 143 */
135 showArcItem_: function() { 144 showArcItem_: function() {
136 $('storage-manager-item-arc').hidden = false; 145 $('storage-manager-item-arc').hidden = false;
137 }, 146 },
138 }; 147 };
139 148
140 // Forward public APIs to private implementations. 149 // Forward public APIs to private implementations.
141 cr.makePublic(StorageManager, [ 150 cr.makePublic(StorageManager, [
142 'setArcSize', 151 'setArcSize',
143 'setBrowsingDataSize', 152 'setBrowsingDataSize',
144 'setDownloadsSize', 153 'setDownloadsSize',
145 'setDriveCacheSize', 154 'setDriveCacheSize',
155 'setOtherUsersSize',
146 'setSizeStat', 156 'setSizeStat',
147 'showArcItem', 157 'showArcItem',
148 ]); 158 ]);
149 159
150 return { 160 return {
151 StorageManager: StorageManager 161 StorageManager: StorageManager
152 }; 162 };
153 }); 163 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698