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

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

Issue 10882014: Slightly modified ETA computation algorithm. Also modified UI of the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 a0fece802d841003ec2d606907c394931c43e6e8..adb7572774194355fcd953c8cc5f8791a19b4fad 100644
--- a/chrome/browser/resources/chromeos/login/oobe.js
+++ b/chrome/browser/resources/chromeos/login/oobe.js
@@ -157,18 +157,20 @@ cr.define('cr.ui', function() {
};
/**
- * Shows estimated time left status.
+ * Shows downloading estimated time left status.
* @param {boolean} enable Are time left status show?
Ivan Korotkov 2012/08/24 09:01:36 Please fix this sentence
ygorshenin1 2012/08/27 12:54:16 Done.
*/
- Oobe.showUpdateEstimatedTimeLeft = function(enable) {
- $('update-estimated-time-left').hidden = !enable;
+ Oobe.showEstimatedTimeLeft = function(enable) {
+ if (enable)
+ $('progress-message').hidden = true;
Ivan Korotkov 2012/08/24 09:01:36 Is it ok that a further call with enable=false won
ygorshenin1 2012/08/27 12:54:16 Done.
+ $('estimated-time-left').hidden = !enable;
};
/**
* Sets estimated time left until download will complete.
* @param {number} seconds Time left in seconds.
*/
- Oobe.setUpdateEstimatedTimeLeft = function(seconds) {
+ Oobe.setEstimatedTimeLeft = function(seconds) {
var minutes = Math.ceil(seconds / 60);
var message = '';
if (minutes > 60) {
@@ -184,7 +186,26 @@ cr.define('cr.ui', function() {
} else {
message = localStrings.getString('downloadingTimeLeftSmall');
}
- $('update-estimated-time-left').textContent = message;
+ $('estimated-time-left').textContent =
+ localStrings.getStringF('downloading', message);
+ };
+
+ /**
+ * Shows message below progress bar.
+ * @param {boolean} enable Are message should be shown?
Ivan Korotkov 2012/08/24 09:01:36 ditto
ygorshenin1 2012/08/27 12:54:16 Done.
+ */
+ Oobe.showProgressMessage = function(enable) {
+ if (enable)
Ivan Korotkov 2012/08/24 09:01:36 ditto
ygorshenin1 2012/08/27 12:54:16 Done.
+ $('estimated-time-left').hidden = true;
+ $('progress-message').hidden = !enable;
+ };
+
+ /**
+ * Sets message below progress bar.
+ * @param {string} message Message that should be shown.
+ */
+ Oobe.setProgressMessage = function(message) {
+ $('progress-message').innerText = message;
};
/**

Powered by Google App Engine
This is Rietveld 408576698