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

Unified Diff: chrome/browser/resources/chromeos/login/oobe.js

Issue 10389064: Added estimated time remaining on AU. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Issues are fixed, sync. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
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..2a793ebfb6353cf763e1e380716688ce2e52ad93 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.getString('downloadingTimeLeftStatusOneHour');
+ } 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.
*/
« no previous file with comments | « chrome/browser/resources/chromeos/login/oobe.css ('k') | chrome/browser/resources/chromeos/login/oobe_screen_update.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698