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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 * @private {number} | 46 * @private {number} |
47 */ | 47 */ |
48 updateTimerId_: -1, | 48 updateTimerId_: -1, |
49 | 49 |
50 /** @override */ | 50 /** @override */ |
51 initializePage: function() { | 51 initializePage: function() { |
52 Page.prototype.initializePage.call(this); | 52 Page.prototype.initializePage.call(this); |
53 | 53 |
54 $('storage-manager-label-downloads').onclick = function() { | 54 $('storage-manager-label-downloads').onclick = function() { |
55 chrome.send('openDownloads'); | 55 chrome.send('openDownloads'); |
| 56 chrome.send('coreOptionsUserMetricsAction', |
| 57 ['Options_StorageOpenDownloads']); |
56 }; | 58 }; |
57 $('storage-manager-label-drive-cache').onclick = function() { | 59 $('storage-manager-label-drive-cache').onclick = function() { |
58 PageManager.showPageByName('storageClearDriveCache'); | 60 PageManager.showPageByName('storageClearDriveCache'); |
| 61 chrome.send('coreOptionsUserMetricsAction', |
| 62 ['Options_StorageOpenClearDriveCache']); |
59 }; | 63 }; |
60 $('storage-manager-label-browsing-data').onclick = function() { | 64 $('storage-manager-label-browsing-data').onclick = function() { |
61 PageManager.showPageByName('clearBrowserData'); | 65 PageManager.showPageByName('clearBrowserData'); |
| 66 chrome.send('coreOptionsUserMetricsAction', |
| 67 ['Options_StorageOpenClearBrowsingData']); |
62 }; | 68 }; |
63 $('storage-manager-label-arc').onclick = function() { | 69 $('storage-manager-label-arc').onclick = function() { |
64 chrome.send('openArcStorage'); | 70 chrome.send('openArcStorage'); |
| 71 chrome.send('coreOptionsUserMetricsAction', |
| 72 ['Options_StorageOpenAndroidStorage']); |
65 }; | 73 }; |
66 $('storage-manager-label-other-users').onclick = function() { | 74 $('storage-manager-label-other-users').onclick = function() { |
67 PageManager.showPageByName('accounts'); | 75 PageManager.showPageByName('accounts'); |
| 76 chrome.send('coreOptionsUserMetricsAction', |
| 77 ['Options_StorageOpenAccounts']); |
68 }; | 78 }; |
69 | 79 |
70 $('storage-confirm').onclick = function() { | 80 $('storage-confirm').onclick = function() { |
71 PageManager.closeOverlay(); | 81 PageManager.closeOverlay(); |
72 }; | 82 }; |
73 }, | 83 }, |
74 | 84 |
75 /** @override */ | 85 /** @override */ |
76 didShowPage: function() { | 86 didShowPage: function() { |
77 // Updating storage information can be expensive (e.g. computing directory | 87 // Updating storage information can be expensive (e.g. computing directory |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 'setDriveCacheSize', | 204 'setDriveCacheSize', |
195 'setOtherUsersSize', | 205 'setOtherUsersSize', |
196 'setSizeStat', | 206 'setSizeStat', |
197 'showArcItem', | 207 'showArcItem', |
198 ]); | 208 ]); |
199 | 209 |
200 return { | 210 return { |
201 StorageManager: StorageManager | 211 StorageManager: StorageManager |
202 }; | 212 }; |
203 }); | 213 }); |
OLD | NEW |