| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <include src="../../../../third_party/polymer/components/polymer/polymer.js"> | |
| 6 | |
| 7 /** | 5 /** |
| 8 * Formats size to a human readable form. | 6 * Formats size to a human readable form. |
| 9 * @param {number} size Size in bytes. | 7 * @param {number} size Size in bytes. |
| 10 * @return {string} Output string in a human-readable format. | 8 * @return {string} Output string in a human-readable format. |
| 11 */ | 9 */ |
| 12 function formatSizeCommon(size) { | 10 function formatSizeCommon(size) { |
| 13 if (size < 1024) | 11 if (size < 1024) |
| 14 return size + ' B'; | 12 return size + ' B'; |
| 15 if (size < 1024 * 1024) | 13 if (size < 1024 * 1024) |
| 16 return Math.round(size / 1024) + ' KB'; | 14 return Math.round(size / 1024) + ' KB'; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 context.lineTo(4, 4); | 398 context.lineTo(4, 4); |
| 401 context.stroke(); | 399 context.stroke(); |
| 402 | 400 |
| 403 chrome.send('updateFileSystems'); | 401 chrome.send('updateFileSystems'); |
| 404 | 402 |
| 405 // Refresh periodically. | 403 // Refresh periodically. |
| 406 setInterval(function() { | 404 setInterval(function() { |
| 407 chrome.send('updateFileSystems'); | 405 chrome.send('updateFileSystems'); |
| 408 }, 1000); | 406 }, 1000); |
| 409 }); | 407 }); |
| OLD | NEW |