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

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

Issue 2070893003: Storage manager: Show Google Drive offline files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correct string and indentation. Created 4 years, 6 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 * @typedef {{ 6 * @typedef {{
7 * totalSize: string, 7 * totalSize: string,
8 * availableSize: string, 8 * availableSize: string,
9 * usedSize: string, 9 * usedSize: string,
10 * usedRatio: number 10 * usedRatio: number
(...skipping 16 matching lines...) Expand all
27 StorageManager.prototype = { 27 StorageManager.prototype = {
28 __proto__: Page.prototype, 28 __proto__: Page.prototype,
29 29
30 /** @override */ 30 /** @override */
31 initializePage: function() { 31 initializePage: function() {
32 Page.prototype.initializePage.call(this); 32 Page.prototype.initializePage.call(this);
33 33
34 $('storage-manager-label-downloads').onclick = function() { 34 $('storage-manager-label-downloads').onclick = function() {
35 chrome.send('openDownloads'); 35 chrome.send('openDownloads');
36 }; 36 };
37 $('storage-manager-label-drive-cache').onclick = function() {
38 PageManager.showPageByName('storageClearDriveCache');
39 };
37 $('storage-manager-label-arc').onclick = function() { 40 $('storage-manager-label-arc').onclick = function() {
38 chrome.send('openArcStorage'); 41 chrome.send('openArcStorage');
39 }; 42 };
40 43
41 $('storage-confirm').onclick = function() { 44 $('storage-confirm').onclick = function() {
42 PageManager.closeOverlay(); 45 PageManager.closeOverlay();
43 }; 46 };
44 }, 47 },
45 48
46 /** @override */ 49 /** @override */
(...skipping 18 matching lines...) Expand all
65 /** 68 /**
66 * Updates the size Downloads directory. 69 * Updates the size Downloads directory.
67 * @param {string} size Formatted string of the size of Downloads. 70 * @param {string} size Formatted string of the size of Downloads.
68 * @private 71 * @private
69 */ 72 */
70 setDownloadsSize_: function(size) { 73 setDownloadsSize_: function(size) {
71 $('storage-manager-size-downloads').textContent = size; 74 $('storage-manager-size-downloads').textContent = size;
72 }, 75 },
73 76
74 /** 77 /**
78 * Updates the size of Google Drive offline files.
79 * @param {string} size Formatted string of the size of Google Drive offline
80 * files.
81 * @private
82 */
83 setDriveCacheSize_: function(size) {
84 $('storage-manager-size-drive-cache').textContent = size;
85 },
86
87 /**
75 * Updates the total size of Android apps and cache. 88 * Updates the total size of Android apps and cache.
76 * @param {string} size Formatted string of the size of Android apps and 89 * @param {string} size Formatted string of the size of Android apps and
77 * cache. 90 * cache.
78 * @private 91 * @private
79 */ 92 */
80 setArcSize_: function(size) { 93 setArcSize_: function(size) {
81 assert(!$('storage-manager-item-arc').hidden); 94 assert(!$('storage-manager-item-arc').hidden);
82 $('storage-manager-size-arc').textContent = size; 95 $('storage-manager-size-arc').textContent = size;
83 }, 96 },
84 97
85 /** 98 /**
86 * Shows the item "Android apps and cache" on the overlay UI. 99 * Shows the item "Android apps and cache" on the overlay UI.
87 * @private 100 * @private
88 */ 101 */
89 showArcItem_: function() { 102 showArcItem_: function() {
90 $('storage-manager-item-arc').hidden = false; 103 $('storage-manager-item-arc').hidden = false;
91 }, 104 },
92 }; 105 };
93 106
94 // Forward public APIs to private implementations. 107 // Forward public APIs to private implementations.
95 cr.makePublic(StorageManager, [ 108 cr.makePublic(StorageManager, [
96 'setArcSize', 109 'setArcSize',
97 'setDownloadsSize', 110 'setDownloadsSize',
111 'setDriveCacheSize',
98 'setSizeStat', 112 'setSizeStat',
99 'showArcItem', 113 'showArcItem',
100 ]); 114 ]);
101 115
102 return { 116 return {
103 StorageManager: StorageManager 117 StorageManager: StorageManager
104 }; 118 };
105 }); 119 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos/storage_manager.html ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698