Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/oobe.js |
| diff --git a/chrome/browser/resources/chromeos/login/oobe.js b/chrome/browser/resources/chromeos/login/oobe.js |
| index 8c0ca09bbc4cc7b62addd39f6571302b3d865603..769f66959b44f90c55dcf749b5e1cfdb53d21616 100644 |
| --- a/chrome/browser/resources/chromeos/login/oobe.js |
| +++ b/chrome/browser/resources/chromeos/login/oobe.js |
| @@ -78,7 +78,7 @@ cr.define('cr.ui', function() { |
| login.HeaderBar.decorate($('login-header-bar')); |
| $('security-link').addEventListener('click', function(event) { |
| - chrome.send('eulaOnTpmPopupOpened', []); |
| + chrome.send('eulaOnTpmPopupOpened'); |
| $('popup-overlay').hidden = false; |
| $('security-ok-button').focus(); |
| }); |
| @@ -92,7 +92,7 @@ cr.define('cr.ui', function() { |
| event.preventDefault(); |
| }); |
| - chrome.send('screenStateInitialize', []); |
| + chrome.send('screenStateInitialize'); |
| }; |
| /** |
| @@ -151,6 +151,37 @@ cr.define('cr.ui', function() { |
| }; |
| /** |
| + * Shows estimated time left status. |
| + * @param {boolean} enable Are time left status show? |
| + */ |
| + Oobe.showUpdateEstimatedTimeLeft = function(enable) { |
| + $('update-estimated-time-left').hidden = !enable; |
| + }; |
| + |
| + /** |
| + * Sets estimated time left until download will complete. |
| + * @param {number} seconds Time left in seconds. |
| + */ |
| + Oobe.setUpdateEstimatedTimeLeft = function(seconds) { |
| + var minutes = Math.ceil(seconds / 60); |
| + var message = ''; |
| + if (minutes > 60) { |
| + message = localStrings.getString('downloadingTimeLeftLong'); |
| + } else if (minutes > 55) { |
| + message = localStrings.getStringF('downloadingTimeLeftStatusHours', 1); |
|
Nikita (slow)
2012/05/15 07:25:09
Since you always use this string with 1 hour pleas
ygorshenin1
2012/05/15 08:12:10
Done.
|
| + } else if (minutes > 20) { |
| + message = localStrings.getStringF('downloadingTimeLeftStatusMinutes', |
| + Math.ceil(minutes / 5) * 5); |
| + } else if (minutes > 1) { |
| + message = localStrings.getStringF('downloadingTimeLeftStatusMinutes', |
| + minutes); |
| + } else { |
| + message = localStrings.getString('downloadingTimeLeftSmall'); |
| + } |
| + $('update-estimated-time-left').innerText = message; |
| + }; |
| + |
| + /** |
| * Sets update message, which is shown above the progress bar. |
| * @param {text} message Message which is shown by the label. |
| */ |